#include <iostream>
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char *argv[]) {
struct jam{
int hh, mm, ss;
}j;
int totaldetik, sisa;
cout<<"Program Konversi Detik ke Jam, Menit dan Detik\n================================================\n";
cout<<"Masukkan total detik : ";
cin>>totaldetik;
j.hh = totaldetik/3600;
sisa = totaldetik%3600;
j.mm = sisa/60;
j.ss = sisa%60;
cout<<totaldetik<<" detik = "<<j.hh<<" : "<<j.mm<<" : "<<j.ss;
return 0;
}
0 komentar:
Posting Komentar