Hello everyone, I am new here and would like to ask for some advice. Like many of you I am currently taking a C++ class at my college. I will not ask you to solve any homework problems for me, but I would like some help.
I have a program that I just got done writing, but it is too long and messy. I was wondering if you could give me tips on how to simplify it. It works as it is(with the values I have tested) so I can at least say that it runs.
Code:
int main(){
int month,cday,inday,wday,ihrs,imins,isecs,whrs,wmins,wsecs,fday,fhrs,fmins,fsecs,fmonth,oday;
cout<<"Enter current month: ";
cin>>month;
cout<<"What day of current month is it? ";
cin>>inday;
cout << "Please enter current hour: ";
cin >> ihrs;
cout << "Please enter current minute: ";
cin >> imins;
cout << "Please enter current second: ";
cin >> isecs;
cout<<"Please enter the number of days you wish to travel back: ";
cin>>wday;
cout << "Enter how many hours you want to travel back: ";
cin >> whrs;
cout << "Enter how many minutes you want to travel back: ";
cin >> wmins;
cout << "Enter how many seconds you want to travel back: ";
cin >> wsecs;