2010年9月30日星期四

Programming...

what i did just now:

//this program is carefully constructed to use the "fallthrough" feature of the switch statement.

#include
using namespace std;

int main()
{
int nummodel;//model number
//Get a model number from the user.
cout<<"kami ada 3 model TV:\n";
cout<<"Ia itu 200,300,dan 400.Mana satu yang anda inginkan?";
cin>>nummodel;

//Display the model's features.
cout<<"Model tersebut mempunyai ciri-ciri:\n";
switch(nummodel)
{
case 400:cout<<"\t Gambar dalam gambar.\n";
case 300:cout<<"\t Bunyi stereo.\n";
case 200:cout<<"\t Alat kawalan jauh.\n";
break;
default:cout<<"Anda hanya boleh memilih model 200,";
cout<<"300,atau 400.\n";
}
return 0;
}


really pei fu Wong Jia Jye can face such thing all the time...


To be continued....

0 评论: