CIS 1057: Homework 5

Handed out: 09/28/2010
Due: by 10:00am on 10/04/2010
Email program to TA

Write a program that in a loop prompts the user to enter an integer, say X, and then prints the first X capital letters in reverse order. The loop terminates when X is less than 1. If X is greater than 26 then after A one starts at the letter at position (X%26)+1 and continues circularly (i.e. after A is Z) until X letters have been printed out.

Here is a sample run of your program:

Enter value for X: 5
	EDCBA
Enter value for X: 9
	IHGFEDCBA
Enter value for X: 30
	DCBAZWYXVUTSRQPONMLKJIHGFEDCBA
Enter value for X: 55
	CBAZWYXVUTSRQPONMLKJIHGFEDCBAZWYXVUTSRQPONMLKJIHGFEDCBA
Enter value for X: -3
	Good Bye