Kami akan Melakukan Update di hari Tertentu, Kunjungin Terus Blog Kami :D salam Blogger :D

Program menghitung nilai akhir >>> Dev C++


Contoh Program >>>



#include<stdio.h>
#include<conio.h>
#include<iostream>

using namespace std;

int main()
{
char nama[30], grade;
int tugas, uts, uas, ntugas, nuts, nuas, NA;


cout<<endl<<endl;
cout<<"\t------------------ PROGRAM MENGHITUNG NILAI AKHIR ------------------"<<endl<<endl;
cout<<"\tMasukkan Nama Siswa : "; gets(nama);
cout<<"\tMasukkan Nilai Tugas : "; cin>>tugas;
cout<<"\tMasukkan Nilai uts : "; cin>>uts;
cout<<"\tMasukkan Nilai uas : "; cin>>uas;

ntugas = tugas*30/100;
nuts = uts*35/100;
nuas = uas*35/100;
NA = ntugas+nuts+nuas;


if(NA>=80)
{
grade = 'A';
}

else if (NA>=70)
{
grade = 'B';
}

else if (NA>=60)
{
grade = 'C';
}

else if (NA>=50)
{
grade = 'D';
}

else
{
grade = 'E';
}

system("cls");

cout<<endl<<endl;
cout<<"\t------------------ Hasil Nilai Akhir Siswa --------------------"<<endl<<endl;
cout<<"\tsiswa yang bernama "<<nama<<" dengan nilai persentasi yang dihasilkan : "<<endl;
cout<<"\tNilai tugas * 30% = "<<ntugas<<endl;
cout<<"\tNilai UTS * 35% = "<<nuts<<endl;
cout<<"\tNilai UAS * 35% = "<<nuas<<endl;
cout<<endl<<endl;
cout<<"\tJadi siswa yang bernama "<<nama<<" memperoleh nilai akhir sebesar "<<NA<<endl<<endl;
cout<<"\tGrade nilai yang didapat adalah "<<grade<<endl;

}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Subscribe to receive free email updates:

0 Response to "Program menghitung nilai akhir >>> Dev C++"

Post a Comment