7. An Old Man's Age One day while Cody was playing with his friends in the woods, they stumbled upon a bearded old man living alone in his cabin. Cody and his friends were shocked that somebody could...

Please help me fidn the right code in C++. Thank you!7. An Old Man's Age<br>One day while Cody was playing with his friends in the woods,<br>they stumbled upon a bearded old man living alone in his<br>cabin. Cody and his friends were shocked that somebody<br>could grow that old. Cody, refusing to believe that it is<br>possible, asked the old man his age. The old man said,

Extracted text: 7. An Old Man's Age One day while Cody was playing with his friends in the woods, they stumbled upon a bearded old man living alone in his cabin. Cody and his friends were shocked that somebody could grow that old. Cody, refusing to believe that it is possible, asked the old man his age. The old man said, "My age is the sum of The Programmer and your teacher's ages subtracted by the age of your friend, Peter". Puzzled with this statement, Cody quickly tried to input the ages of The Programmer, his teacher, and his friend, Peter. Help Cody find out the age of the old man. Input 1. Age of The Programmer 2. Age of his teacher 3. Age of his friend, Peter Output The first line will contain a message prompt to input the age of The Programmer. The second line will contain a message prompt to input the age of his teacher. The third line will contain a message prompt to input the age of his friend, Peter. The last line will contain the age of the old man. Enter age of The Programmer: 21 Enter age of his teacher: 52 Enter age of his friend, Peter: 10 The age of the old man is-63

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here