Tom is crazy about cricket. He was watching India vs. Australia World cup final match. Australia won the toss and elected to bat first. They finished batting with a score of X. Next, India started to bat and scored Y runs in N number of balls. As Tom is very crazy, he wants to calculate the run rate and check whether there is a probability for India to win or not. Help him calculate the run-rate and check the probability.
Answers
Answer:
Explanation:
#include<stdio.h>
int main()
{
int australia_score,india_score,balls,b;
float required_run_rate,current_run_rate;
printf("Enter the total score of Australia=");
scanf("%d",&australia_score);
printf("Enter the score of India=");
scanf("%d",&india_score);
printf("Enter the total no of balls played by India=");
scanf("%d",&b);
printf("Enter the total no of balls played less than equal to 120=");
/*Let the total balls played be 120*/
scanf("%d",&balls);
if(balls<=120)
{
required_run_rate = australia_score/balls;
current_run_rate = india_score/b;
}
printf("The Required Run Rate was = %f \n",required_run_rate);
printf("The Current Run Rate was = %f",current_run_rate);
return 0;
}
PLEASE MARK ME BRAINLIEST !!!!
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c,d;
float overs,covers,c_r_r,t_r_r;
std::cin>>a>>b>>c>>d;
overs=int(a/6)+((float(a%6)*0.1));
covers=int(d/6)+((float(d%6)*0.1));
c_r_r=float(c)/float(covers);
t_r_r=b/overs;
std::cout<<overs<<"\n"<<covers<<"\n"<<fixed<<setprecision(1)<<c_r_r<<"\n"<<t_r_r<<"\n";
if(t_r_r>c_r_r){
std::cout<<"Not Eligible to Win";
}
else{
std::cout<<"Eligible to Win";
}
}