Question: C + + , Pointer Tutorial, write a program to teach a user about the three different ways the * operator is used in C

C++, Pointer Tutorial,
write a program to teach a user about the three different ways the * operator is used in C++.
** sample run:
Enter your name: Linda
Enter your age you will be this year: 2011
Hello Linda ! You were born in 10!
****
Must have 3 or more functions with parameters for this program.
Must do data validations for menu options and for any numbers you read from the user.
**
#include
using namespace std;
const int CURRENT_YEAR =2021;
int main(){
string name ="";
int age =0;
int birthYear =0;
cout << "Enter your name: ";
cin >> name;
cout <<"
Enter your age you will be this year: ";
cin >> age;
birthYear = CURRENT_YEAR - age;
cout <<"
Hello "<< name <<"! You were born in "<< birthYear <<"!"<< endl;
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!