Cricket Match

Suman Barik
0
#include <iostream>

using namespace std;

float func(int score, int run, float over) {

  if(run <= 6 & run > 0) {
  
    return score + run;

    cout << over;

  }

  
  else if(run == 0) {

    return score + 1;

    cout << over;

  }

  else if(run > 6) {

    return score;

    cout << over;

  }
  
}

int main() {

  int a = 0, b;

  float c;

  //cout << "The current score and run is : "

  cin >> b >> c;


  cout << "The current score of India is " << func(a, b, c) << " in " << c << " overs. ";
  
  return 0;
  
}
  
    
  
  

Post a Comment

0Comments
Post a Comment (0)