Contoh Program C++ Nilai Mutu

#include <constream.h>

void main()

{

clrscr();

int nilai;

cout<<“Masukan nilai : “;

cin>>nilai;

if (nilai<=100&&nilai>=82)

{

cout<<“A : Sangat Baik”;

}

else if(nilai<=81&&nilai>=71)

{

cout<<“B : Baik”;

}

else if(nilai<=70&&nilai>=60)

{

cout<<“C : Cukup”;

}

else if(nilai<=59&&nilai>=50)

{

cout<<“D : Kurang”;

}

else if(nilai<=49&&nilai>=0)

{

cout<<“E : Sangat Kurang”;

}

else

{

cout<<“Nilai yang dimasukan salah”;

}

getch();

}

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