Input NIM :
Input Nilai Mahasiswa :
Input Nilai Absen :
Input Nilai Tugas :
Input Nilai UTS :
Input Nilai UAS :
Output :
**************************
UNSADA
**************************
NIM :
Nama Mahasiswa :
Nilai Absen :
Nilai Tugas :s
Nilai UTS :
Nilai UAS :
Nilai Akhir :
***************************
Ingin input lagi [Y/T]?
Proses :
Nilai Akhir = 10% absen + 20% tugas + 30% uts + 40% uas
Coding :
#include <iostream.h>
#include <conio.h>
void main()
{
float absen, tugas, uts, uas, nilai_akhir;
char nim[8], nama[25], lagi;
do
{
clrscr();
cout<<"\nInput NIM : "; cin>>nim;
cout<<"\nInput Nama Mahasiswa : "; cin>>nama;
cout<<"\nInput Nilai Absen : "; cin>>absen;
cout<<"\nInput Nilai Tugas : "; cin>>tugas;
cout<<"\nInput Nilai UTS : "; cin>>uts;
cout<<"\nInput Nilai UAS : "; cin>>uas;
clrscr();
cout<<"\n**********";
cout<<"\nUNSADA";
cout<<"\n**********";
cout<<"\nNIM : " <<nim;
cout<<"\nNama Mahasiswa : " <<nama;
cout<<"\nNilai Absen : " <<absen;
cout<<"\nNilai Tugas : " <<tugas;
cout<<"\nNilai UTS : " <<uts;
cout<<"\nNilai UAS : " <<uas;
nilai_akhir=((0.1*absen) + (0.2*tugas) + (0.3*uts) + (0.4*uas));
cout<<"\nNilai Akhir : " <<nilai_akhir;
cout<<"\n**********";
cout<<"\n\nIngin Input Lagi [Y/T]?"; cin>>lagi;
}
while ((lagi=='y') || (lagi 'Y'));
getch();
}
SELAMAT MENCOBA !!!