practice for programmers
Logged in as Anonymous Student
254271 Fun of Prog 63 - Mini Test 1
A. Modulo 2 or 3
Read in a number and check if it is divisible by 2 or 3. Output "2" when it is divisible by 2, "3" when is is divisible by 3, and "-" when it is neither divisible by 2 nor 3. If it is divisible by 2 and 3 then output "23".
B. Coding Stars
Write a program that inputs the width and height of a rectangle and then draws it using
C. Total characters
Read in lines of input until "stop". Print out the number of characters in the words, not including "stop".
Hint: you might want to use a do-while or while loop containing a nextLine to read input.
Read in a number. Print out the factorial. (5! = 5 * 4 * 3 * 2 * 1 = 120)
E. Big U
Read in a number (greater than 2). Print out a U shape of that size.