Question: Here is my code not sure but it give me an error int main() { //declare variables int birthYear; int currentYear; int age=0; //set message
Here is my code not sure but it give me an error
int main() { //declare variables int birthYear; int currentYear; int age=0;
//set message of happy birth day string message="Happy Birthday!";
//read birth year and current year cout>birthYear;
cout>currentYear;
//calcuate the number of years age=currentYear-birthYear;
cout
//pause program output on console system("pause"); return 0;
In this assignment your robot willoraw a birthday cake for your child. - Display the words "Happy Birthday." - Display your child's age by entering both your child's year of birth and the current year as inputs. You will need your program to deduct your child's year of birth from the current year and then to display the output. For example. 2016 minus 2010 is six. Note: The output to the last program is an integer. Provide the program that edits, compiles and executes the above tasks. Provide the header, source code, and a screenshot of the output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
