Lab 1-2Due Jan 31, 11:59pm
|
Write a C++ program which takes a 4-digit number (integer) as input from the user and prints the number in reverse order. For example, if the number entered is 5678 then the output should be 8765. The program should repeat this until the user decides to quit.
You need to pay attention to the following:
Input a 4 digit Number to Reverse and press Enter: 452 This is not a 4-digit number:452 Input a 4 digit Number to Reverse and press Enter: 56789 This is not a 4-digit number:56789 Input a 4 digit Number to Reverse and press Enter: 1432 New Reversed Number is: 2341 Enter Q to quit, enter any letter to continue n Input a 4 digit Number to Reverse and press Enter: 4325 New Reversed Number is: 5234 Enter Q to quit, enter any letter to continue Q Thanks for playing!
Feature | % |
---|---|
Program correctness and completeness with respect to specifications | 70% |
Code Format (Indenting, variable names) | 10% |
Code Comments | 10% |
A document showing all complete run outputs for the test cases given. | 10% |
Run the program for the following data, turning in a document will all run data (as a Word, text or pdf document)
Trial | Input number |
---|---|
1 | 1554 |
2 | 16778 |
3 | 53 |
4 | 4856 |
5 | 9137 |
Requirement | Grading Comments | Points | Score |
---|---|---|---|
Correct output on required trial data | 50 | ||
Good clean, easy to understand Input and output operations | 10 | ||
Complete source code | 10 | ||
Appropriate code formatting (indenting, whitespace) | 5 | ||
Good identifier names | 5 | ||
Description Comments on top | 5 | ||
Section comments throughout | 5 | ||
Document wth trial runs included | 10 | ||
Total | 100 |