C++ Input nilai Dan Grade nilai

//lh3.googleusercontent.com/-K5UKWzgJhmU/AAAAAAAAAAI/AAAAAAAACdI/CN3nwiBZsGE/s512-c/photo.jpg
November 19, 2016




    gambar di samping sanagat membantu dalam menghitung nilai dan grade, kita hanya input nilai dan gradenya keluar, langsung aja ya saya beri kodingannya.



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

using namespace std;

int main ()
{

int TotalTugas,Tugas,MID,TotalMID,UAS,TotalUAS,TotalNilai;

cout<<"***Menghitung Nilai Rata-Rata Mata Kuliah IT Mahasiswa Tanri Abeng University***"<<endl<<endl;

cout<<"\t\tMasukan Nilai Tugas\t\t    = "; cin>>Tugas;
cout<<"\t\tMasukan Nilai MID\t           = "; cin>>MID;
cout<<"\t\tMasukan Nilai UAS\t           = "; cin>>UAS;
cout<<endl;
cout<<"*************************** Hasil Penilaian Adalah **************************"<<endl<<endl;
TotalTugas=Tugas*30/100; TotalMID=MID*35/100; TotalUAS=UAS*35/100; TotalNilai=TotalTugas+TotalMID+TotalUAS;

if (TotalNilai >=90)
    cout<<"\t\t------------ Selamat Grade Anda A ------------ \n"<<endl;
else if (TotalNilai >=80)
    cout<<"\t\t------------ Selamat Grade Anda B ------------ \n"<<endl;
else if (TotalNilai >=70)
    cout<<"\t\t------------ Selamat Grade Anda C ------------ \n"<<endl;
else if (TotalNilai >=60)
    cout<<"\t\t------------ Selamat Grade Anda D ------------ \n"<<endl;
else if (TotalNilai >=0)
    cout<<"\t\t------------ Selamat Grade Anda E ----------- \n"<<endl;

cout<<"********************************** Selesai **********************************";

getch ();
}


Related Post

SUBSCRIBE TO OUR NEWSLETTER

closed