0
Guys what the code needs to run properly ?
#include<iostream> main() { cout << "please enter the number: "; int num; cin >> num; int num1; num1 = num / 86400; cout << "the number in days= " << num1 << endl;; int num2; num2 = num - (num1*86400) ; num2 = num2 / 3600; cout << "the number in hours= " << num2<<endl; int num3; num3 = num- (num1*86400 ) - (num2 * 3600); num3 = num3 / 60; cout << "the number in min= " << num3 << endl; int num4; num4 = num - (num1 * 86400) - (num2 * 3600) - (num3 * 60); cout << "the number in seconds= " << num4 << endl; cin >> num; int k ; cin>>k ; }
4 odpowiedzi
+ 2
not sure what your problem is... maybe specify more?
0
I need to write complet c++ program ..input integer and convert it to days,hours,minute, and second.. What should I fill in the code to give the required result?
0
Unit in seconds
0
Can you adjust it so that I enter the number of days, not seconds ... and add months too, please! 😅