{
long runs[10],inn[10],not_out[10],tot[10],ball[10];
long double avg[10];
long double strk[10];
char name[10][10];
clrscr();
cout<<"\n~~~~~~~~~~~~~~~ENTER THE DETAILS OF THE PLAYERS~~~~~~~~~~~~~~";
for(int i=1;i<=1;i++)
{
cout<<"\n ENTER THE NAME : ";
cin>>name[i];
cout<<"\n NO OF MATCHES PLAYED : ";
cin>>inn[i];
cout<<"\n ENTER THE TOTAL RUNS SCORED : ";
cin>>runs[i];
cout<<"\n NUMBER OF BALLS FACED : ";
cin>>ball[i];
cout<<"\n NO OF TIMES NOT OUT : ";
cin>>not_out[i];
}
for(i=1;i<=1;i++)
{
tot[i] = inn[i]-not_out[i];
if(inn[i]==not_out[i])
{
avg[i] = runs[i];
}
else
{
avg[i] = runs[i]/tot[i];
}
strk[i] = (runs[i]*100)/ball[i];
}
for(i=1;i<=1;i++)
{
cout<<"\n NAMES"<<" INNINGS"<<" RUNS"<<" NOT OUT"<<" AVG"<<" STRIKE RATE";
cout<<"\n"<
}
getch();
return 0;
}
I have named thus SACHIN because he is living each and every part of cricket.
ReplyDelete