formatting source-code for 153fb7b8a5

This commit is contained in:
github-actions
2020-05-30 04:02:09 +00:00
parent 92fe9495ec
commit 8a2de9842b
175 changed files with 1671 additions and 3460 deletions

View File

@@ -19,8 +19,7 @@
using namespace std;
int main(int argc, char* argv[])
{
int main(int argc, char* argv[]) {
double GPA;
double highestGPA;
string name;
@@ -35,24 +34,19 @@ int main(int argc, char* argv[])
infile >> GPA >> name;
highestGPA = GPA;
while (infile)
{
if (GPA > highestGPA)
{
while (infile) {
if (GPA > highestGPA) {
stk.clear();
stk.push(name);
highestGPA = GPA;
}
else if (GPA == highestGPA)
{
} else if (GPA == highestGPA) {
stk.push(name);
}
infile >> GPA >> name;
}
cout << "Highest GPA: " << highestGPA << endl;
cout << "Students the highest GPA are: " << endl;
while (!stk.isEmptyStack())
{
while (!stk.isEmptyStack()) {
cout << stk.top() << endl;
stk.pop();
}