Solution
Aditi answered on
Aug 06 2022
ASSIGNMENT
#include#includestruct batsman
{
char name[25];
int runs,score,balls,toruns,tobal,ones,twos,threes,fours,sixes;
int max_six,max_run,max_four;
float str;
}pl1[100],pl3;
struct bowle
{
char name[25];
int runsgv,wkttkn,overs;
int max_w;
float econ;
}pl2[100],pl4;
int main()
{
int plno,choice;
int i,n,m;
printf("Enter the Batsman detail:\n");
printf("Enter the number of batsman:\n");
scanf("%d",&m);
for(i=0;i {
printf("Enter name of batsman%d:\n",i+1);
scanf("%s",pl1[i].name);
printf("Enter the number of ones scored by player%d:\n ",i+1);
scanf("%d",&pl1[i].ones);
printf("Enter the number of twos scored by player%d:\n ",i+1);
scanf("%d",&pl1[i].twos);
printf("Enter the number of threes scored by player%d:\n ",i+1);
scanf("%d",&pl1[i].threes);
printf("Enter the number of fours scored by player%d:\n ",i+1);
scanf("%d",&pl1[i].fours);
printf("Enter the number of sixes scored by player%d:\n ",i+1);
scanf("%d",&pl1[i].sixes);
printf("Enter the balls played by the player%d:\n",i+1);
scanf("%d",&pl1[i].balls);
}
printf("\nEnter the bowlers details:\n");
printf("Enter the number of bowlers:\n");
scanf("%d",&n);
for(i=0;i {
printf("\nEnter name of bowler%d:",i+1);
scanf("%s",pl2[i].name);
printf("Enter the runs given by the bowler%d:\n ",i+1);
scanf("%d",&pl2[i].runsgv);
printf("Enter the overs bowled by the bowler%d:\n",i+1);
scanf("%d",&pl2[i].overs);
printf("Enter the wickets taken by the bowler%d\n",i+1);
scanf("%d",&pl2[i].wkttkn);
}
printf("Thank you all details are recorded\n");
do
{
printf("Enter the choice:\n 1)Batsman detail:\n 2)Bowlers detail:\n 3)Match summary:\n 4)Record:\n 5)Exit\n ");
scanf("%d",&choice);
...