Skip to content

Instantly share code, notes, and snippets.

@b-adams
Created October 30, 2011 20:36
Show Gist options
  • Save b-adams/1326396 to your computer and use it in GitHub Desktop.
Save b-adams/1326396 to your computer and use it in GitHub Desktop.
Sample output for Program 6
Welcome to badams's Program 6
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? -2
Now where did you see '-2' on the menu!?
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? 10
Now where did you see '10' on the menu!?
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? 0
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? -1
Now exiting badams's Program 6
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? 1
(Part 1) How many times should I loop?
Input a number between 5 and 10: 6
Enter the 0th price to add in: 1
Enter the 1th price to add in: 1
Enter the 2th price to add in: 1
Enter the 3th price to add in: 1
Enter the 4th price to add in: 1
Enter the 5th price to add in: 7
The total cost is 12 and the average price is 2
(Part 0) Welcome to the Main Menu. Please select one of the following:
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? 2
(Part 2) Enter your stop character: q
Enter a letter: *
You entered: '*'. That's ASCII character number '42' or, in hex, '2a'
Enter a letter: 8
You entered: '8'. That's ASCII character number '56' or, in hex, '38'
Enter a letter: .
You entered: '.'. That's ASCII character number '46' or, in hex, '2e'
Enter a letter: >
You entered: '>'. That's ASCII character number '62' or, in hex, '3e'
Enter a letter: z
You entered: 'z'. That's ASCII character number '122' or, in hex, '7a'
Enter a letter: Z
You entered: 'Z'. That's ASCII character number '90' or, in hex, '5a'
Enter a letter: a
You entered: 'a'. That's ASCII character number '97' or, in hex, '61'
Enter a letter: A
You entered: 'A'. That's ASCII character number '65' or, in hex, '41'
Enter a letter: q
You entered: 'q'. That's ASCII character number '113' or, in hex, '71'
(Part 0) Welcome to the Main Menu. Please select one of the following:
(Part 0) Welcome to the Main Menu. Please select one of the following:
0: Display this lovely menu.
1: Total some numbers
2: Display ASCII codes for letters
3: Compute some Ulam numbers, whatever those are.
-1: Quit
Whatchawannado? 3
(Part 3) Please enter the number you wish to start at: 10
Consider... 10. It's even, so divide it by two: 4
4 is not 10/2. It's even, so divide it by two: 5
Consider... 5. It's odd, so triple it and add one: 15
15 is not 3*5+1. It's odd, so triple it and add one: 16
Consider... 16. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 1
1 is not 16/2. It's even, so divide it by two: 8
Consider... 8. It's even, so divide it by two: 4
Consider... 4. It's even, so divide it by two: 2
Consider... 2. It's even, so divide it by two: 1
Consider... 1. It's less than two!
It took you 6 steps to finish!
(Part 0) Welcome to the Main Menu. Please select one of the following:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment