Java Reference
In-Depth Information
Using this concept, write a program that uses a for loop to generate and display the
progression 1, 2, 4, 8, 16, 32, and so on.
10 . The ASCII lowercase letters are separated from the uppercase letters by 32. Thus, to
convert a lowercase letter to uppercase, subtract 32 from it. Use this information to
write a program that reads characters from the keyboard. Have it convert all lower-
case letters to uppercase, and all uppercase letters to lowercase, displaying the result.
Make no changes to any other character. Have the program stop when the user enters
a period. At the end, have the program display the number of case changes that have
taken place.
11 . What is an infinite loop?
12 . When using break with a label, must the label be on a block that contains the break ?
Search WWH ::




Custom Search