#include
#include
#include
void main()
{
int ch2;
do
{
clrscr();
cout<<"\n Program By : pratya wutticho "<
cin>>ch2;
switch(ch2)
{
case 1 :
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"This is Turbo C++Program";
cout<<"C++ is hight language";
getch();
break;
case 2 :
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"This is Turbo C++Program."<<" "<<" It is very easy.";
cout<<"I love C++."<<" "<<" It's high level language.";
getch();
break;
case 3 :
clrscr(); //clear screen standard function form conio.h
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"This is Turbo C++Progarm"<
break;
case 4 :
clrscr(); //clear screen standard function form conio.h
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<
break;
case 5 :
int number4,number5;
float x4,y4,z4 ;
//set value of variable
number4=20;
number5=30;
x4=25.25;y4=30.05;z4=10.75;
//display calculation result
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"Program Display Mathmetic calculation"<
cout<<"number1="<
cout<<"number2="<
cout<<"number1+number2="<
cout<<"number1-number2="<
cout<<"x+y+z="<
cout<<"x*y*z="<
cout<<"50*25*12.5="<<50*25*12.5<
break;
case 6 :
float A5=125.25125;
float B5=10.7525;
float C5=212.15;
clrscr(); //function in conio.h for clear screen
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"Display set precision of float number..."<
cout<<"A+B+"<
cout<<"A*B*C="<
cout<<"A*B="<
cout<<"A+B+C="<
cout<<"A+B+C="<
cout<<"A/B="<
break;
case 7 :
double x6=9.0 ,y6=2.0;
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"Display useing mathmetic functions...\a"<
break;
case 8 :
clrscr();//clear screen
int number6,ch6,number7;
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"\n";
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"Hello Program C++"<<'\n';//new line
cin>>number6; //enter inter from keyboard
cout<<"\nEnter 1 character :";
cin>>ch6;//enter 1 character from keyboard
cout<<"\n\nPress any key to display...";
getch();//wait press any key
clrscr();
//Program display value from variable
cout<<"You enter number and character :\n\a";
cout<<"Value of number 1 :"<
getch();
break;
case 9 :
float rad; //declared real variable
const float PI= 3.14159; // defined constant PI
//start statement
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<< "Please enter radius of circle : ";
cin>>rad;
float area = PI*rad*rad;//declarad variable at position that want to use
cout<<"\n\nRadius of circle = "<
break;
case 10 :
int numbera,numberb,numberc;//declared 3 integer variable
//start startment
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<" Please enter 3 integer number :\n ";
cin>> numbera,numberb,numberc;//enter 3 amount integer from keyboard
cout<<"\nPress any key to display.... " ;
getch();
clrscr();
//process display value from variable
cout<<"You enter 3 number: \n\a";
cout<<"Value of number1 :\n"<
getch();//wait press any key
break;
case 11 :
clrscr();
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<<"\n Program By : pratya wutticho "<
cout<<"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n";
cout<<"\n";
cout<< "Display change base number ..."<
cout<< "10 decimal to hexadecimal = "<
cout<< "5865 decimal to hexadecimal = " <
cout<< "1250 decimal to octal = "<
cout<< "02342 octal to decimal = "<
cout<< "0xabc 125 hexadecimal to decimal = "<
cout<< "0xf hexadecimal to decimal = "<
break;
}//end of do...while
}//end of switch
while(ch2!=0);
getch();
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น