63 152
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #14867 in C++ for arif hussain

Question #14867
Write a program to get age (in years) of a person (input taken from the user). Calculate the age in months, days & hours and then print all these on the screen
Expert's answer

#include <conio.h>
#include <iostream>
using namespace std;

int main(){
&
int i,j,q,w;
cout<<"Enter your age in years: ";
& cin>>i;
& q=i*12;
j=i*360;
w=j*24; &
& cout<<"\nYour age in months: "<<q;

cout<<"\nYYour age in days: "<<j;

cout<<"\nYour age in hours: "<<w<<"\n\n";

system("PAUSE");

}
&

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