Thursday, January 31, 2019

√ Sajian Dan Pemakaian If Else Pada C++

#include
#include
#include

main( )
 {
int gol;
long gapok=0;

clrscr();
cout<<"        Data Jabatan"<cout<<"====================="<cout<<"1.Direktur"<cout<<"2.Staff"<cout<<"Pilih Golongan [1/2]:";cin>>gol;

if(gol==1)
gapok=5000000;
else if (gol==2)
gapok=4000000;
else
gapok=0;

cout<<"Gaji Pokok           :"<getch();
}

Sumber http://www.hendrisetiawan.com