Question: You will be completing a program that prints out your name and age to stdout. All the code you write will go in hello.cpp TODO:
You will be completing a program that prints out your name and age to stdout. All the code you write will go in hello.cpp
TODO:
Create a variable to hold your age
Create a variable to hold your name
Initialize the values of these two variables
Write a function hello that takes no arguments and returns a std::string containing the following text: "Hello world! My name is yourname and I am yourage years old." where yourname and yourage are the values of your name and age variables.
The autograder is not that smart. It will be reasonably accommodating about your name, accept any integer for an age, but the rest of the text must match exactly.
In C text is stored in a string type. We haven't gone over that in class yet, but a quick Google search should enlighten you on how to use it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
