|
Lab 12 |
| . |
War of 1812 Quiz using ints
recognizing off-by-one guesses using an int box and the subtraction-operator ---------------------------------------- Lab #12.1: Write a War of 1812 quiz with an exact message ---------------------------------------- Write a program that asks your customer to guess the year that the war of 1812 was fought. Output an appropriate message including exactly how far from 1812 their guess is. You may use as many if-commands and operators as you wish in order to report the accurate number of years away from 1812 their guess is. Just to be clear, a guess of 1811 and a guess of 1813 are both one year off, and a guess of 1810 and a guess of 1814 are both two years off. |