Exercise Questions
Last updated
Last updated
Write a Program that takes two integer inputs of num1
and num2
. Determine if num1
is greater than, equal to, or less than num2
.
Write a program such that when given a non-negative number input, output whether or not if the number is 2 away from a multiple of 10.
Write a program that takes a String object as an input. If the value of the input is "Saturday"
or "Sunday"
, output "Yay, it is the weekend!"
. Otherwise output "Boo, it is not the weekend ..."
.
Given the following menu of food items and their prices, output the total cost of a meal if the user inputted the values for their choices of food item, side item, and a drink.
Try this problem using switch cases.
Burger = $2.10
Fries = $1.60
Small = $1.50
Cheeseburger = $2.40
Onion Rings = $2.00
Medium = $1.65
Hotdog = $1.00
Sweet Potato Fries = $2.25
Large = $1.85