Program c++ Menghitung Nilai Kelulusan

#include <iostream.h>
#include <conio.h>
void main() {
clrscr();
float uts, uas,nil;
cout<<“====Program Kelululsan====\n”;
cout<<“==========================\n”;
cout<<” Nilai UTS : “;cin>>uts;
cout<<” Nilai UAS : “;cin>>uas;
nil = (0.7 * uts) + (0.3*uas);
cout<<” Nilai Akhir : “<<nil<<endl;
if (nil >= 60)
{
cout<<“==========================\n”;
cout<<” Selamat Anda Lulus \n”;
}
else {
cout<<” Mamam Anda Gagal\n”;
}
if (nil<=50)
{
cout<<“Grade E\n”;cout<<“Mengulang”;
}
else if (nil<=60)
{
cout<<“Grade D\n”;cout<<“Kurang”;
}
else if (nil<=75)
{
cout<<“Grade C\n”;cout<<“Cukup”;
}
else if (nil<=85)
{
cout<<“Grade B\n”;cout<<“Baik”;
}
else if (nil<=100)
{
cout<<“Grade A\n”;cout<<“Excellent”;
}
getch();
}

^Rachmatika Irfani^

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s