List
#include <conio.h>
#include <iostream.h>
#include <stdio.h>
main()
{
char nama[30],Jurusan[3],Nim[10];
int nilai1,nilai2,nilai3,nilai4,nilai5;
cout<<"\t\t MENGHITUNG NILAI AKHIR PEMROGRAMAN"<<endl;
cout<<endl;
cout<<"Nama : ";gets(nama);
cout<<"Nim : ";cin>>Nim;
cout<<"Nilai Absen : ";cin>>nilai1;
cout<<"Nilai Tugas : ";cin>>nilai2;
cout<<"Nilai Ulangan : ";cin>>nilai3;
cout<<"Nilai Praktek : ";cin>>nilai4;
nilai5 =(nilai1+nilai2+nilai3+nilai4)/4;
if(nilai5>80)
{
cout<<"Nilai Akhir = "<<nilai5<<endl;
cout<<"GRADE = A\n";
cout<<"Keterangan = Sangat Baik";
}
else
if(nilai5>70)
{
cout<<"Nilai Akhir = "<<nilai5<<endl;
cout<<"GRADE = B\n";
cout<<"Keterangan = Baik";
}
else
if(nilai5>60)
{
cout<<"Nilai Akhir = "<<nilai5<<endl;
cout<<"GRADE = C\n";
cout<<"Keterangan = Cukup";
}
else
{
cout<<"Nilai Akhir = "<<nilai5<<endl;
cout<<"GRADE = D\n ";
cout<<"Keterangan = Kurang";
}
getch();
}
Tidak ada komentar:
Posting Komentar