Contoh Program Konversi Jam, menit, detik menjadi satuan total detik dalam bahasa C++
#include <iostream>
#include <conio>
main()
{
cout <<" Dibuat oleh Ervan Pangestu "<< endl;
cout <<" NIM -------- "<< endl;
cout <<" "<< endl;
typedef struct {long int hh; //jam
long int mm; //menit
long int ss //detik
} Jam;
Jam J;
long int Jumlah ;
cout <<"Jam:";cin>>J.hh;
cout <<"Menit:";cin>>J.mm;
cout <<"Detik:";cin>>J.ss;
Jumlah = (J.hh 3600)+(J.mm*60)+J.ss
cout<<"Jumlah Detik ="<<Jumlah<< endl;
cout<<""<< endl;
cout<<"Press any key to close"<< endl;
getch ();
}
Hasil :
Note : Program sepenuhnya belum sempurna, berusahalah untuk mencari kesalahannya
Subscribe to:
Post Comments (Atom)
Chord Virgoun - Cinta Tak Dianggap
Virgoun - Cinta Tak Dianggap Intro : G Em C G D Caraku tuk menjaga hatiku Em C ...
-
Review Tesla Invader 3 Mod ini dibuat di China by TESLACIGS yang terkenal dengan mod firing tanpa delay sama sekali, spesifikasinya...
-
DAGGER 80W SPESIAL EDITION STAR WARS Dagger mod dari VO Tech begitu mempesona dan populer dikalangan vapers, selain bentuknya yang ke...
-
Berikut program dengan bahasa C++ #include <iostream> #include <conio> main () { float bbi,tb cout<<" Dibuat...
No comments:
Post a Comment