- 1
Help
What should I do ? I want to show also minutes and second in this program can anyone help me https://code.sololearn.com/czmnTlxD0ZQP/?ref=app
8 Respuestas
+ 2
But here minimum quantity of time is hours you can't calculate minuets and seconds , if you enter hours
+ 1
If you wanna convert week to hour you have to give input as week
+ 1
No I just want to add in this program minutes and second MANSOOR PASHA
+ 1
#include <iostream>
using namespace std;
int main() {
int hrs,week,days;
cin>>hrs;
week=hre/168;
hre=hre-(week*168);
days=hre/24;
hre=hre-(days*24);
min=hrs*60;
sec=min*60;
cout<<"week"<<week<<"\n";
cout<<"days"<<days<<"\n";
cout<<"hrs"<<hrd<<"\n";
cout<<"minute"<<min<<"\n";
cout<<"second"<<sec<<"\n";
return 0;
}
+ 1
If you input hours how can you get minutes and seconds
+ 1
Write a program that will prompt the user to enter number if hours. It computes and displays the
number of weeks, days, hours, minutes, and seconds. For example 4000 hrs = 23 weeks, 5 days, 16 hrs
MANSOOR PASHA
+ 1
If you enter second you can get weeks, days, hours, minutes and seconds
0
Ok thank you so muchMANSOOR PASHA
I will write only week,days and hours