Letakan Script Buku tamu sobat Disini

Selasa, 06 Desember 2011

contoh pernyataan else if


Contoh pernyataan else if
#include
#include
void main()
{
int chanel;
cout<<"ada 5 kabel televisi"<<<"chanel."<<<"yang mana faforitmu(2,4,6,8)?";
cin>>chanel;
if(chanel==2)
{cout<<<<"chanel 2 adala top rangking minggu lalu"; }
else if(chanel==4)
{ cout<<"chanel 4 banyak siaran berita";}
else if(chanel==6)
{ cout<<"chanel 6 banyak siaran film lama";}
else if(chanel==8) { cout<<"acara lokal"; }
else { cout<<"chanel\t"<<<"\tdoes no exist";}
cout<<<<"happy watching"; getch();

Hasil program setelah di eksekusi.


0 komentar:

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Online Project management