#include
#include
#include
void main()
{
int ch6;
do
{
clrscr();
cout<<"\n Program By : pratya wutticho "<
cin>>ch6;
switch(ch6)
{
case 1 :int no60,score60[10];
float avg60=0,sum60=0;
clrscr();
cout<<"Please enter score of student 10 persons\n\n";
for(no60=0;no60<=9;++no60)
{cout<<"Std.#"<
}cout<<"O.K. you enter complete...press any key to display\n";
getch();clrscr();
cout<<"Display your enter score :\n";
for(no60=0;no60<=9;++no60)
{cout<<"Std.#"<
}
avg60=sum60/10.0;
cout<<"Summation of score ="<
break;
case 2 :
int score62[10];
float avg62=0,sum62=0;
clrscr();
int no62;
cout<<"Please enter score of student 10 persons\n\n";
for(no62=0;no62<=9;++no62)
{cout<<"Std.#"<
}
cout<<"O.K. you enter complete...press any key to display\n";
getch();clrscr();
cout<<"Display your enter score :\n";
for(no62=0;no62<=9;++no62)
{cout<<"Std.#"<
avg62=sum62/10.0;
}
cout<<"Summation of score ="<
break;
case 3:
int score63[10][3];
clrscr();
int std_no63,subj_no63,col63,row63;
cout<<"Please enter score of student 10 persons\n\n";
gotoxy(5,3);cout<<"Std# Math English Science";
col63=15;row63=5;
for(std_no63=0;std_no63<=9;++std_no63)
{gotoxy(7,row63);
cout<
{gotoxy(col63,row63);
cin>>score63[std_no63][subj_no63];
col63+=15;
}
row63++;
col63=15;
}
cout<<"O.K you enter complete...press any key to display\n\a";
getch();clrscr();
cout<<"*** Display score of student 10 persons 3 subject ***\n\n";
gotoxy(5,3);cout<<"Std# Math English Science";
col63=15;row63=5;
for(std_no63=0;std_no63<=9;++std_no63)
{gotoxy(7,row63);
cout<
{gotoxy(col63,row63);
cout<
}
row63++;col63=15;
}
cout<<"\n\nO.K. press any key to exit\n\a";
getch();
break;
case 4:
int number64[5]={10,20,30,40,50};
clrscr();
int i64,sum64=0,avg64;
for(i64=0;i64<=4;i64++)
cout<<"#"<
sum64+=number64[i64];
avg64=sum64/5;
cout<<"\nSummation of All Array : "<
break;
}//end of do...while
}//end of switch
while(ch6!=0);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น