Friday, 15 January 2010

PROGRAM HITUNG NILAI AKHIR

#include”stdio.h”
#include”iostream.h”
#include”string.h”
#include”iomanip.h”
#include”conio.h”
main()
{
int jumlah_mahasiswa;
int a;
char nama[20][20];
int nilai_tugas[20];
int nilai_uts[20];
int nilai_uas[20];
int nilai_akhir[20];
cout<<"PROGRAM HITUNG NILAI AKHIR"<cout<<"MATERI PEMROGRAMAN C++"<cout<<"Masukkan Jumlah Mahasiswa : ";cin>>jumlah_mahasiswa;
cout<for(a=1;a<=jumlah_mahasiswa;a++)
{
cout<<"Mahasiswa Ke - "<cout<<"Nama Mahasiswa : ";gets(nama[a]);
cout<<"Nilai Tugas : ";cin>>nilai_tugas[a];
cout<<"Nilai UTS : ";cin>>nilai_uts[a];
cout<<"Nilai UAS : ";cin>>nilai_uas[a];
cout<nilai_akhir[a]=(nilai_tugas[a]*30/100)+(nilai_uts[a]*30/100)+(nilai_uas[a]*40/100);
}
NAMA : ARIS NURDIAN
NIM : 18094136
KELAS : 12.IC.21 (B)
TUGAS LATIHAN 7.4 (2)
clrscr();
cout<<" DAFTAR NILAI"<cout<<" MATERI : PEMROGRAMAN C++"<cout<<"--------------------------------------------------------"<cout<<"No"<<" "<<"Nama"<<" "<<" "<<"Nilai"<<"
"<<"Grade"<cout<<" "<<"Mahasiswa"<<" "<<"----------------------"<cout<<" "<<"Tugas"<<" "<<"UTS"<<" "<<"UAS"<<" "<<"Akhir"<cout<<"--------------------------------------------------------"<for(a=1;a<=jumlah_mahasiswa;a++)
{
if(nilai_akhir[a]>=80)
{
cout<cout<cout<cout<cout<cout<cout<}
else if(nilai_akhir[a]>=70)
{
cout<cout<cout<cout<cout<cout<cout<}
else if(nilai_akhir[a]>=59)
{
cout<cout<cout<cout<cout<cout<cout<}
else if(nilai_akhir[a]>=50)
{
cout<cout<cout<cout<cout<cout<cout<}
else
{
cout<cout<cout<cout<cout<cout<cout<}
}
cout<<"--------------------------------------------------------"<getch();
}

No comments:

Post a Comment