Simple Question:
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.
1
Expert's answer
2011-10-11T08:47:55-0400
#include <iostream>
using namespace std;
void main(void){ int age = 0; int dayOffset = 0; int days = 0; cout << "Please, enter an age: "; cin >> age;
dayOffset = (int)age / 4; days = age * 365 + dayOffset;
cout << "Age in days: " << days << endl; cout << "\nInput 0 and press Enter exit..."; cin >> dayOffset; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment