- 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

14th May 2020, 11:36 AM
Saber
8 Respuestas
+ 2
But here minimum quantity of time is hours you can't calculate minuets and seconds , if you enter hours
14th May 2020, 12:01 PM
MANSOOR PASHA
MANSOOR PASHA - avatar
+ 1
If you wanna convert week to hour you have to give input as week
14th May 2020, 11:46 AM
MANSOOR PASHA
MANSOOR PASHA - avatar
+ 1
No I just want to add in this program minutes and second MANSOOR PASHA
14th May 2020, 11:51 AM
Saber
+ 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; }
14th May 2020, 11:54 AM
MANSOOR PASHA
MANSOOR PASHA - avatar
+ 1
If you input hours how can you get minutes and seconds
14th May 2020, 11:55 AM
MANSOOR PASHA
MANSOOR PASHA - avatar
+ 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
14th May 2020, 11:59 AM
Saber
+ 1
If you enter second you can get weeks, days, hours, minutes and seconds
14th May 2020, 12:02 PM
MANSOOR PASHA
MANSOOR PASHA - avatar
0
Ok thank you so muchMANSOOR PASHA I will write only week,days and hours
14th May 2020, 12:04 PM
Saber