# Jawaban ujian MID. #include int pil; char tny; main(){ menu: cout<<"\nMENU PILIHAN : "; cout<<"\n[1] Hitung IPK Mahasiswa"; cout<<"\n[2] Hitung Gaji Karyawan";

## Presentasi berjudul: "Jawaban ujian MID. #include int pil; char tny; main(){ menu: cout<<"\nMENU PILIHAN : "; cout<<"\n[1] Hitung IPK Mahasiswa"; cout<<"\n[2] Hitung Gaji Karyawan";"— Transcript presentasi:

Jawaban ujian MID

#include int pil; char tny; main(){ menu: cout<<"\nMENU PILIHAN : "; cout<<"\n[1] Hitung IPK Mahasiswa"; cout<<"\n[2] Hitung Gaji Karyawan"; cout<<"\n[3] Keliuar Dari Aplikasi"; cout >pil;

switch(pil) {case 1: {int n,sks=0,tsks=0; char mkul[20],ket; float nilai=0,rata,jml=0,ipk=0; cout >n; for(int i=1;i<=n;i++){ cout<<"\n\nData ke = "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.info/12/3671818/slides/slide_3.jpg", "name": "switch(pil) {case 1: {int n,sks=0,tsks=0; char mkul[20],ket; float nilai=0,rata,jml=0,ipk=0; cout >n; for(int i=1;i<=n;i++){ cout<< \n\nData ke = <sks; cout >ket; if(ket== A || ket== a ) nilai+=(4*sks); else if(ket== B || ket== b ) nilai+=(3*sks); else if(ket== C || ket== c )", "description": "switch(pil) {case 1: {int n,sks=0,tsks=0; char mkul[20],ket; float nilai=0,rata,jml=0,ipk=0; cout >n; for(int i=1;i<=n;i++){ cout<< \n\nData ke = <sks; cout >ket; if(ket== A || ket== a ) nilai+=(4*sks); else if(ket== B || ket== b ) nilai+=(3*sks); else if(ket== C || ket== c )", "width": "800" }

nilai+=(2*sks); else if(ket=='D' || ket=='d') nilai+=(1*sks); else if(ket=='E' || ket=='e') nilai+=(0*sks); else cout<<"Range nilai hanya dari A-E"; tsks+=sks; ipk=nilai/tsks; } cout<<"\nNilai total = "<tny; if(tny=='y' ||tny=='Y') {clrscr(); goto menu;}}

case 2: {char nama_karyawan[20],nik[5],gol; float gator,pajak,gaber,gapok,tunj,makan,trans; bool status,kelamin,kendaraan; cout<<"\n*************************************"; cout<<"\n* MENGHITUNG GAJI BERSIH KARYAWAN *"; cout<<"\n*************************************"; cout<nik; cout >kelamin; cout >status; cout >kendaraan; cout >gol; cout >makan; if (gol=='a' || gol=='A') gapok=500; else if (gol=='b' || gol=='B')

gapok=600; else if (gol=='a' || gol=='A') gapok=700; cout<<"\nGaji pokok anda : Rp "< { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.info/12/3671818/slides/slide_6.jpg", "name": "gapok=600; else if (gol== a || gol== A ) gapok=700; cout<< \nGaji pokok anda : Rp <

gaber=gator-pajak; cout<<"\nGaji kotornya : Rp "<tny; if(tny=='y' ||tny=='Y') {clrscr(); goto menu;} } default: return 0;} getch();}

Presentasi serupa