- Screenshot :
- Source Code :
#include <iostream.h>
#include <conio.h>
#include <windows.h>
void main()
{
system ("COLOR A");
clrscr();
main_menu:
char pilihan;
int menu;
float uts, uas, absensi, tugas, quis, rata, nilai;
cout<<"\n\n ||===========>>>>>SMK TI BALI GLOBAL KLUNGKUNG<<<<<============|| "<<endl;
cout<<" ___________DAFTAR NILAI AKHIR SISWA____________"<<endl;
cout<<"\n\n\n--------------------------------------------------------------------------------"<<endl;
cout<<"MASUKAN NO ABSENSI : ";
cin>>menu;
if(menu<=4)
{
cout<<menu;
}
else
{
cout<<"\n\n\n !!!!! MAAF NOMOR HANYA SAMPAI 4 !!!!!";
}
switch(menu)
{
case 1 :
clrscr();
cout<<"\n\n--------------------------------------------------------------------------------"<<endl;
cout<<" | 1 | IKOMANG SATHYA DHARMA FREMA |"<<endl;
cout<<"\n--------------------------------------------------------------------------------"<<endl;
cout<<"\nMASUKAN NILAI UTS : ";
cin>>uts;
cout<<"MASUKAN NILAI UAS : ";
cin>>uas;
cout<<"MASUKAN NILAI ABSENSI : ";
cin>>absensi;
cout<<"MASUKAN NILAI TUGAS : ";
cin>>tugas;
cout<<"MASUKAN NILAI QUIS : ";
cin>>quis;
rata = (uts * 0.30) + (uas * 0.30) + (absensi * 0.15) + (tugas * 0.15) + (quis * 0.10);
cout<<"____________________________________________ "<<endl;
cout<<"\n NILAI RATA RATA YANG DI DAPATKAN ADALAH "<<rata<<endl;
cout<<"____________________________________________"<<endl;
cout<<"\n MASUKAN NILAI RATA RATA : ";
cin>>nilai;
if(nilai>=90)
{
cout<<"\n\n ==========> MENDAPATKAN NILAI A <========="<<endl;
}
else if(nilai>=80)
{
cout<<"\n ==========> MENDAPATKAN NILAI B <========="<<endl;
}
else if(nilai>=70)
{
cout<<"\n ==========> MENDAPATKAN NILAI C <========="<<endl;
}
else if(nilai>=60)
{
cout<<"\n ==========> MENDAPATKAN NILAI D <========="<<endl;
}
else if(nilai<=60)
{
cout<<"\n ==========> MAAF TIDAK LULUS <========="<<endl;
}
break;
case 2 :
clrscr();
cout<<"\n\n--------------------------------------------------------------------------------"<<endl;
cout<<" | 2 | IDA BAGUS PRIYA PRAYOGRA |"<<endl;
cout<<"\n--------------------------------------------------------------------------------"<<endl;
cout<<"\nMASUKAN NILAI UTS : ";
cin>>uts;
cout<<"MASUKAN NILAI UAS : ";
cin>>uas;
cout<<"MASUKAN NILAI ABSENSI : ";
cin>>absensi;
cout<<"MASUKAN NILAI TUGAS : ";
cin>>tugas;
cout<<"MASUKAN NILAI QUIS : ";
cin>>quis;
rata = (uts * 0.30) + (uas * 0.30) + (absensi * 0.15) + (tugas * 0.15) + (quis * 0.10);
cout<<"____________________________________________ "<<endl;
cout<<"\n NILAI RATA RATA YANG DI DAPATKAN ADALAH "<<rata<<endl;
cout<<"____________________________________________"<<endl;
cout<<"\n MASUKAN NILAI RATA RATA : ";
cin>>nilai;
if(nilai>=90)
{
cout<<"\n\n ==========> MENDAPATKAN NILAI A <========="<<endl;
}
else if(nilai>=80)
{
cout<<"\n ==========> MENDAPATKAN NILAI B <========="<<endl;
}
else if(nilai>=70)
{
cout<<"\n ==========> MENDAPATKAN NILAI C <========="<<endl;
}
else if(nilai>=60)
{
cout<<"\n ==========> MENDAPATKAN NILAI D <========="<<endl;
}
else if(nilai<=60)
{
cout<<"\n ==========> MAAF TIDAK LULUS <========="<<endl;
}
break;
case 3 :
clrscr();
cout<<"\n\n--------------------------------------------------------------------------------"<<endl;
cout<<" | 3 | IPUTU PARWATA |"<<endl;
cout<<"\n--------------------------------------------------------------------------------"<<endl;
cout<<"\nMASUKAN NILAI UTS : ";
cin>>uts;
cout<<"MASUKAN NILAI UAS : ";
cin>>uas;
cout<<"MASUKAN NILAI ABSENSI : ";
cin>>absensi;
cout<<"MASUKAN NILAI TUGAS : ";
cin>>tugas;
cout<<"MASUKAN NILAI QUIS : ";
cin>>quis;
rata = (uts * 0.30) + (uas * 0.30) + (absensi * 0.15) + (tugas * 0.15) + (quis * 0.10);
cout<<"____________________________________________ "<<endl;
cout<<"\n NILAI RATA RATA YANG DI DAPATKAN ADALAH "<<rata<<endl;
cout<<"____________________________________________"<<endl;
cout<<"\n MASUKAN NILAI RATA RATA : ";
cin>>nilai;
if(nilai>=90)
{
cout<<"\n\n ==========> MENDAPATKAN NILAI A <========="<<endl;
}
else if(nilai>=80)
{
cout<<"\n ==========> MENDAPATKAN NILAI B <========="<<endl;
}
else if(nilai>=70)
{
cout<<"\n ==========> MENDAPATKAN NILAI C <========="<<endl;
}
else if(nilai>=60)
{
cout<<"\n ==========> MENDAPATKAN NILAI D <========="<<endl;
}
else if(nilai<=60)
{
cout<<"\n ==========> MAAF TIDAK LULUS <========="<<endl;
}
break;
case 4 :
clrscr();
cout<<"\n\n--------------------------------------------------------------------------------"<<endl;
cout<<" | 4 | COKORDA GDE AGUNG UTAMA PUTRA |"<<endl;
cout<<"\n--------------------------------------------------------------------------------"<<endl;
cout<<"\nMASUKAN NILAI UTS : ";
cin>>uts;
cout<<"MASUKAN NILAI UAS : ";
cin>>uas;
cout<<"MASUKAN NILAI ABSENSI : ";
cin>>absensi;
cout<<"MASUKAN NILAI TUGAS : ";
cin>>tugas;
cout<<"MASUKAN NILAI QUIS : ";
cin>>quis;
rata = (uts * 0.30) + (uas * 0.30) + (absensi * 0.15) + (tugas * 0.15) + (quis * 0.10);
cout<<"____________________________________________ "<<endl;
cout<<"\n NILAI RATA RATA YANG DI DAPATKAN ADALAH "<<rata<<endl;
cout<<"____________________________________________"<<endl;
cout<<"\n MASUKAN NILAI RATA RATA : ";
cin>>nilai;
if(nilai>=90)
{
cout<<"\n\n ==========> MENDAPATKAN NILAI A <========="<<endl;
}
else if(nilai>=80)
{
cout<<"\n ==========> MENDAPATKAN NILAI B <========="<<endl;
}
else if(nilai>=70)
{
cout<<"\n ==========> MENDAPATKAN NILAI C <========="<<endl;
}
else if(nilai>=60)
{
cout<<"\n ==========> MENDAPATKAN NILAI D <========="<<endl;
}
else if(nilai<=60)
{
cout<<"\n ==========> MAAF TIDAK LULUS <========="<<endl;
}
break;
}
cout<<"\n\n\n\nAPAKAH ANDA INGIN KEMBALI KE MENU (Y/N) : ";
cin>>pilihan;
if(pilihan=='Y' || pilihan=='y')
{
clrscr();
getch();
goto main_menu;
}
getch();
}
Jadi kalian tinggal Copy - Paste tapi ingat kalian tingal tambahin case sesuai keinginan kalian, sama case nya dengan yang lain tapi cuman ganti nama dan nomor absennya.... ingat jika anda ingin berhasil dalam programan jangan asal copy paste pastikan dulu dan ingat kalian pariasiin codenya agar bisa terlihat lain dan mewujudkan hal baru..!!
No comments:
Post a Comment