Tuesday 8 January 2013

TC c++ Chapter 1 Problem No :1

Draw a program of age program which change the age into minutes and second.

#include<iostream.h>
#include<conio.h>
void main()
{
int a; // inputs the age
cin>>a;
int b; // for days
b=a*365;
int c; // minutes
c=b*1440;
int d; // second
d=c*60;
cout<<"This is the age in minutes: "<<c<<endl<<"This is the age in second: "<<d<<endl;
}

No comments:

Post a Comment

Comments please: