Question
Trying to figure out how to round the GPA for the students. Everything else works, just need help with the rounding. Note: I put the
Trying to figure out how to round the GPA for the students. Everything else works, just need help with the rounding.
Note: I put the areas I need help with in bold within my ouput and expected output.
Input:
add
Robert
2.8165
add
Nancy
3.76
drop
1
quit
My output:
Enter Option : Student name: Robert's GPA:
Enter Option : Student name: Nancy's GPA:
Enter Option : 0: Robert has a GPA of 2.8165 1: Nancy has a GPA of 3.76
Enter Option : Index of student to drop:
Enter Option : 0: Robert has a GPA of 2.8165
Enter Option :
Expected output:
Enter Option: Student name: Robert's GPA:
Enter Option: Student name: Nancy's GPA:
Enter Option: 0: Robert has a GPA of 2.8 1: Nancy has a GPA of 3.8
Enter Option: Index of student to drop:
Enter Option: 0: Robert has a GPA of 2.8
Enter Option:
My Code:
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started