Question: Lab 3 : Grade Calculator Program Objective The objective of this lab is to develop a C + + program that allows users to enter
Lab : Grade Calculator Program
Objective
The objective of this lab is to develop a C program that allows users to enter grades and prints out to
the console the corresponding letter grades.
Learning Outcomes
By the end of this lab, students will be able to:
Use dowhile loops to repeatedly execute a block of code.
Implement ifelse statements to make decisions based on user input.
Validate user input to ensure it falls within a specified range.
Develop a complete C program from scratch.
Program Requirements
The program should prompt the user to enter a grade between and
Grades can be integers or decimal numbers.
The program must check if the entered grade is within the acceptable range If not, it
should inform the user and prompt for a valid grade.
Based on the entered grade, the program should determine and print the corresponding letter
grade following this scheme:
o A:
o B:
o C:
o D:
o F:
The program should allow the user to enter multiple grades using a dowhile loop. After each
grade entry, the program should ask the user if they want to enter another grade.
The program should provide clear feedback to the user, including the letter grade and any error
messages for invalid input.
Example Output
Enter a grade :
Letter grade: B
Do you want to enter another grade? yn: y
Enter a grade :
Invalid grade. Please enter a grade between and
Do you want to enter another grade? yn: y
Enter a grade :
Letter grade: F
Do you want to enter another grade? yn: n
Thank you for using the grade calculator!
Submission
Submit the source code file cpp to the courses blackboard webpage.
Evaluation Criteria
Correct use of dowhile loops and ifelse statements.
Proper input validation to ensure grades are within the range of
Accurate determination and display of letter grades.
Code readability and proper commenting.
Tips
Test your program with various inputs to ensure it handles all edge cases.
Use meaningful variable names and add comments to explain your code.
Lab : Grade Calculator Program
Objective
The objective of this lab is to develop a C program that allows users to enter grades and prints out to
the console the corresponding letter grades.
Learning Outcomes
By the end of this lab, students will be able to:
Use dowhile loops to repeatedly execute a block of code.
Implement ifelse statements to make decisions based on user input.
Validate user input to ensure it falls within a specified range.
Develop a complete C program from scratch.
Program Requirements
The program should prompt the user to enter a grade between and
Grades can be integers or decimal numbers.
The program must check if the entered grade is within the acceptable range If not, it
should inform the user and prompt for a valid grade.
Based on the entered grade, the program should determine and print the corresponding letter
grade following this scheme:
A:
B:
C:
D:
F:
The program should allow the user to enter multiple grades using a do while loop. After each
grade entry, the program should ask the user if they want to enter another grade.
The program should provide clear feedback to the user, including the letter grade and any error
messages for invalid input.
Example Output
Enter a grade :
Letter grade: B
Do you want to enter another grade? :
Enter a grade :
Invalid grade. Please enter a grade between and
Do you want to enter another grade? :
Enter a grade :
Letter grade: F
Do you want to enter another grade? :
Thank you for using the grade calculator!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
