1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
double homeQuarter1(double min, string max);
double awayQuarter1(double min, string max);
int main()
{
string maximum;
double minimum=0;
vector<double> homeScore;
vector<double> awayScore;
homeQuarter1(minimum, maximum);
}
double homeQuarter1(double min, string max)
{
double homeScore, minimum=0;
string maximum;
cout << "1Q Home team score: \nPlease enter a number (min: 0, max: no limit): ";
cin >> homeScore;
while (homeScore>=min)
{
awayQuarter1(minimum, maximum);
return homeScore;
}
while (homeScore<min)
{
cout << "Invalid input, try agian!\nPlease enter a number (min: 0, max: no limit): ";
cin >> homeScore;
while (homeScore>=min)
{
awayQuarter1(minimum, maximum);
return homeScore;
}
}
}
double awayQuarter1(double min, string max)
{
string maximum;
double awayScore, minimum=0;
cout << "1Q Away team score: \nPlease enter a number (min: 0, max: no limit): ";
cin >> awayScore;
while (awayScore>=min)
{
homeQuarter2(minimum, maximum);
return awayScore;
}
while (awayScore<min)
{
cout << "Invalid input, try agian!\nPlease enter a number (min: 0, max: no limit): ";
cin >> awayScore;
while (awayScore>=min)
{
homeQuarter1(minimum, maximum);
return awayScore;
}
}
}
|