(C++) PROGRAM KONVERSI JAM>MENIT>DETIK



#include<iostream>
#include<string.h>
#include<conio.h>
using namespace std;
int main()

{
      float x,y,z,detik;
      string aksi,balik;
      cout<<"=============== JAM MENIT DETIK KE DETIK ==============="<<endl;
      cout<<"Penjelasa program."<<endl;
      cout<<" JAM -> ISI JAM YA BRO"<<endl;
      cout<<" MENIT -> ISI MENIT YA BRO"<<endl;
      cout<<" DETIK -> ISI DETIK YA BRO"<<endl;
      cout<<"MAU TAU BERAPA DETIK? -> TULIS YA/TIDAK."<<endl;
      cout<<"=========================================="<<endl;
      ulang:
      cout<<"JAM = ";
      cin>>x;
      cout<<"MENIT = ";
      cin>>y;
      cout<<"DETIK = ";
      cin>>z;
      cout<<"KAMU MAU TAU BERAPA DETIK? = ";
      cin>>aksi;
      if(aksi == "YA")
      {
            detik = (x*360)+(y*60)+(z*1);
            cout<<"Hasil Konversi adalah = "<<detik;
      }
      else if(aksi == "ya")
      {
            detik = (x*360)+(y*60)+(z*1);
            cout<<"Hasil Konversi adalah = "<<detik;
      }
      else{
            cout<<"Tekan sembarang untuk keluar dari program";
      }

      cout<<endl<<"Belum Puas , Mau Lagi ? Y / T"<<endl;
      cin>>
       balik;
      if(balik == "Y"){
            goto ulang;
      }else{
            cout<<"Tekan sembarang untuk keluar dari program";
      };
}

Related

CPLUS 8532910677426345605

Posting Komentar

emo-but-icon

Follow Us

Hot in week

Recent

Comments

Side Ads

Text Widget

Connect Us

item