60 429
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #31330 in C++ for Rajsegara

Question #31330
Prompt for and receive your age in years and months and calculate and display your age in months. If the calculated months figure is more than 500, three asterisks should also appear beside the month figure
Expert's answer
#include <iostream>

using namespace std;

int main()
{
cout << "enter& your age in years and months" << endl;
int a,b,n,sum;
cout << "enter& your age in years " << endl;
cin>>a;
cout << "and enter& your age in& months" << endl;
cin>>b;

n=a*12;
sum=n+b;
& cout << "sum age in& months = " <<sum;
& if(sum>500){cout<<"***"<<endl;}

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions