3 integers named score1,score2 and score3. and I assign their numbers ( has to be between 0 and 300) has to keep printing scores until sentinel is reached ( -999 ) also has to count the amount of valid groups and invalid.Theres a few other things I need to implement into the program but I feel if I understand this I might be able to do the rest. Any help would be appreciated. Can't wrap my head around this function idea. Have been trying for days now.
The function does not need to be the way I wrote it. The professor gave me a tip and said to use 6 "if" statements.
#include <iostream>
#include <fstream>
using namespace std;
int validGroup(int a,int b,int c,ofstream &); //ofstream for the outfile later
int main()
{
int score1,score2,score3;
int numvalidgroups = 0;
//int numinvalidgroups;
int numgroups = 0;
The program needs the numbers to be from 0-300 and if it goes below or above has to print invalid and continue on to the next set. My professor told us that we could use -999 as a sentinel since he hasn't taught us how to stop the process another way. The only way I can reach that is if I input it myself to stop the program.