practice for programmers
Logged in as Anonymous Student
254271 Fun of Prog 63 - Review 2
A. The smallest
Write a program that reads in 2 numbers and only prints the smallest number.
B. Custom repeater
Write a program that reads in 1 line of input and if it contains less than 8 characters then it repeats it 3 times, else only 2 times.
C. Triple sort
Write a program that reads in 3 numbers and outputs them sorted in smallest to largest order.
D. Word order
Write a program that reads in 3 words and outputs them sorted by their number of letters (smallest to largest).
E. Super hello world
Write a program that prints "hello world" 20 times. Use a loop.
F. Super spicy
Write a program that reads in a number and prints out "phet" followed by "mahk" repeated that number of times.
G. Three times table
Write a program that prints out 0 x 3 = 0, 1 x 3 = 3, up to 3 x 20 = 60. Use a loop.
H. From here to 100
Write a program that reads in a number and prints out all the numbers between it and 100.
I. Super repeater
Write a program that reads in 1 line of text and then a number x. It should print out the text x times.
J. Addition sequences
Write a program that reads in 3 numbers. The 1st number is the starting number. The 2nd number is the increment. The 3rd number is number of times.