Post date: Sep 27, 2018 8:37:26 AM
Flow of Control
3.2 Boolean Expressions
Recommended Self-Test Exercises:
p 163-164: Ex. 19, 20 and 21.
Lab exercises:
Write a program that reads three integers and prints them in increasing order. Example:
Please enter three integers: 9 21 5
The integers in increasing order are: 5 9 21
Using the switch statement, write a program that reads an integer between 0 and 10 and then prints the word corresponding to the number. Example:
Please enter a number between 0 and 10: 7
You entered: seven
Using the logical operators (&&, ||, or !), ask the user to enter a grade between 0 and 100 and display the letter grade corresponding to that grade using the following table:
Write a two number calculator. The program should ask for two numbers and one operator. Make sure to not divide by zero.
Write a Java program that reads a floating-point number and prints "zero" if the number is zero. Otherwise, print "positive" or "negative". Add "small" if the value of the number is between 0 and 1 or between 0 and -1, or "large" if it exceeds 1,000,000.