Answer to Question #4508 in C++ for Azi Amar
how would I write a C++ program that converts an age in years to the age in days?
I seem to be getting an error and I'm not sure what the errorf is or how to solve it.
using namespace std;
int age = 0;
int dayOffset = 0;
int days =
cout << "Please, enter an age: ";
dayOffset = (int)age / 4;
days = age * 365 +
cout << "Age in days: " << days <<
cout << "\nInput 0 and press Enter exit...";
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!