Minggu, 09 Mei 2010

program sederhana java membuat menu menggunakan perulangan

#include
main(){
int x,y;
cout<<"1. Single Player \n";
cout<<"2. Multiplayer \n";
cout<<"\nSelect Game : ";
cin>>x;
switch(x){
case 1:
cout<<"\nSingle Player";
break;
case 2:
cout<<"\nMultiplayer\n";
cout<<"\nNumber of Player : ";
cin>>y;
for (int i=1;i<=y;++i){
cout<<"\nPlayer "<break;}
return 0;
}

1 komentar:

Geg mengatakan...

sepertinya itu bukan java, tapi bahasa C

Posting Komentar