Sunday, 13 July 2014

Program Penilaian menggunakan CASE-BREAK pada C++

Program Penilaian menggunakan CASE-BREAK pada  C++
monggo di copast

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

void main()
{
int kode  ;

cout<<"\t\tSilahkan Pilih Nilai Anda\n\n" ;
cout<<"Pilihan 1 : nilai >= 80 \n" ;
cout<<"Pilihan 2 : nilai 65<=   Nilai < 80 \n" ;
cout<<"Pilihan 3 : nilai 55<=   Nilai < 65 \n" ;
cout<<"Pilihan 4 : nilai 40<=   Nilai < 55 \n" ;
cout<<"Pilihan 5 : nilai < 40 \n\n" ;
cout<<" Masukkan Pilihan Anda  : " ;
cin>>kode;
switch (kode)
{
case 1 :
cout<<"\nNilai Anda (A)";
break ;
case 2 :
cout<<"\nNilai Anda (B)";
break ;
case 3 :
cout<<"\nNilai Anda (C)";
break ;
case 4 :
cout<<"\nNilai Anda (D)";
break ;
case 5 :
cout<<"\nNilai Anda (E)";
break ;
default :
cout<<"\nMaaf nilai yang anda masukkan salah";

}
 getch () ;
}

Hasil Program :


SHARE THIS

Author:

Etiam at libero iaculis, mollis justo non, blandit augue. Vestibulum sit amet sodales est, a lacinia ex. Suspendisse vel enim sagittis, volutpat sem eget, condimentum sem.

0 komentar: