okay so with my code shown below everything seems to be working fine exept for my minimum number, i have to find what the minimum number is depending on the input , but i have to use -1 to end the program, therefore my min is being set to -1 , how do i work around that ? thanks in advance
#include <iostream>
#include <cmath>
usingnamespace std;
int main() {
cout << "Score Tally App\n\n";
string a;
string b;
string c;
string d;
string f;
double numscores = 0;
double sum = 1; // taking into account the -1 that must be input to end program
double high = 0;
double low = 0;
for (int i = 0; i >= 0; numscores++) {
cout << "Enter a score(%) or -1 to end: " ;
cin >> i;
sum += i;
if ( i >= 90) {
a += "*";
} elseif ( i < 90 && i >= 80) {
b += "*";
} elseif ( i < 80 && i >= 70) {
c += "*";
} elseif ( i < 70 && i >= 60) {
d += "*";
} elseif ( i < 60 && i != -1) {
f += "*";
}
if ( high < i ) {
high = i ;
} elseif ( low > i ) {
low = i ;
}
}
numscores -= 1; // taking into account the -1 that must be input to end program
cout << "\n\nChart of Scores: \n";
cout << "A's: " << a << "\n";
cout << "B's: " << b << "\n";
cout << "C's: " << c << "\n";
cout << "D's: " << d << "\n";
cout << "F's: " << f << "\n\n";
cout << "Summary Statistics:\n";
cout << "Number of scores: " << numscores << endl;
cout << "Average of score: " << sum / numscores << endl;
cout << "Highest score : " << high << endl;
cout << "Lowest score : " << low;
return 0;
}