C++ Konversi Waktu

#include <iostream>
#include <conio.h>
int main(){
int a,h,j,m,d;
cout<<"  ========================\n";
cout<<"  ===> KONVERSI WAKTU <===\n";
cout<<"  ========================\n\n";
cout<<" Masukkan Waktu(detik) : ";
cin>> a;
h=a/86400;
j=a/3600;
m=(a%3600)/60;
d=(a%3600)%60;
cout<<"\n     !!!!!!!!!!!!!!!!!!\n";
cout<<"     !! FORMAT WAKTU !!\n";
cout<<"     !!!!!!!!!!!!!!!!!!\n\n";
cout<<"        Hari  : Jam : Menit : Detik"<<endl;
cout<<"         "<<h<<"    :  "<<j<<"  :   "<<m<<"   :  "<<d<<endl;
getch();
}

0 Response to "C++ Konversi Waktu"

Posting Komentar