|
Response Details:
#include <iostream>
using namespace std;
void main()
{
int Days, Months, Years, R, Age;
cout << "Give the Age in days = " ;
cin >> Age; // 3725, 8734, 76453
Years = Age / 365; //
R = Age % 365; //
Months = R / 30; //
Days = R % 30; //
cout << "Your Age = " << endl;
cout << Years << ':' << Months
<< ':' << Days << endl;
}
this is my answer but I couldn't check whether it's right or wrong becuase I don't have the C++ programme , so is it right ? if so I will rate you as a lifesaver :)
thanks
|