Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a COMPLETE C++ program to ask the user to enter a grade. If the grade is g

ID: 3807111 • Letter: W

Question

Write a COMPLETE C++ program to ask the user to enter a grade. If the grade is greater than or equal to 60, but less than or equal to 100, the program will display "Congratulation! You passed the exam. If the grade is less than 60, but greater than or equal to 0, the program will display " You failed the test. Work harder." If the grade is not within the range from 0 to 100, the program will display "Invalid grade." The following is a sample running result: Please enter your grade: 89 Congratulation! You passed the exam. Press any key to continue. ..... Please enter your grade: 55 You failed the test. work harder. Press any key to continue. ..... Please enter your grade: 105 Invalid grade. Press any key to continue.....

Explanation / Answer

#include<iostream.h>

#include<conio.h>

int main()

{

int grade;

do{

cout<<"please enter your grade";

cin>>grade;

if(grade>=60 && grade<=100)

cout<<"Congradulation! You passed the exam"<<" ";

if(grade<60)

cout<<"you faiked the test.work harder";

if(grade<0 || grade>100)

cout<<"invalid grade";

cout<<"press any key to continue...";

}

while(getchar());

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote