#include<conio.h>
#include<stdio.h>
#include<iostream.h>
main()
{
char nama[30],nim[8],*ket;
float nilai_absen,nilai_tugas,nilai_uts,nilai_akhir;
cout<<" DAFTAR NILAI "<<endl;
cout<<"=========================="<<endl;
cout<<"Nama : ";gets(nama);
cout<<"NIM : ";cin>>nim;
cout<<"Nilai absen : ";cin>>nilai_absen;
cout<<"Nilai tugas : ";cin>>nilai_tugas;
cout<<"Nilai UTS : ";cin>>nilai_uts;
cout<<endl;
cout<<" DAFTAR NILAI "<<endl;
cout<<"=========================="<<endl;
cout<<"Nama : "<<nama<<endl;
cout<<"NIM : "<<nim<<endl;
cout<<"Nilai absen : "<<nilai_absen<<endl;
cout<<"Nilai tugas : "<<nilai_tugas<<endl;
cout<<"Nilai UTS : "<<nilai_uts<<endl;
nilai_akhir=(nilai_absen*25/100)+(nilai_tugas*35/100)+(nilai_uts*40/100);
if (nilai_akhir > 65)
ket="Lulus";
else
ket="Tidak Lulus";
cout<<"Nilai akhir : "<<nilai_akhir<<endl;
cout<<"Keterangan : "<<ket<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar