Pengenalan Switch

Senin, 10 Mei 2010

| | |
/*pengenalan Switch*/
#include
#include
#include

void main()
{
clrscr();
int nilai;
cout<<"Masukan Nilai (1-3):";cin>>nilai;
switch(nilai)
{
case 1:
cout<<"Satu"< break;
case 2:
cout<<"Dua"< break;
case 3:
cout<<"Tiga"< break;
}
getch();
}

0 komentar:

Posting Komentar