Question: Question 1 ( Simple Grading System ) : ( 1 mark ) Write a C + + program that does the following: Prompts the user
Question Simple Grading System: mark
Write a C program that does the following:
Prompts the user to enter their score for a recent exam a value between and
Using an ifelse statement, the program should determine the grade based on the following criteria:
o Score and above: Grade A
o Score : Grade B
o Score : Grade C
o Score : Grade D
o Score below : Grade F
After determining the grade, the program should output a message with the user's score and corresponding grade.
Example:
Input:
Enter your exam score:
Output:
Your score is and your grade is B
Question Simple Calculator: marks
Write a C program that does the following:
Prompts the user to enter two numbers.
Asks the user to choose an operation
Using a switch statement, the program should perform the chosen operation on the two numbers and display the result.
If the user enters an invalid operation, the program should display an error message.
Example:
Input:
Enter first number:
Enter second number:
Choose an operation :
Output:
Result:
Invalid Operation Example:
Input:
Enter first number:
Enter second number:
Choose an operation :
Output:
Error: Invalid operation.
Question Find Duplicate Value: marks
Write a C program that does the following:
Prompts the user to enter four integer values.
The program should check if any two or more of the values are duplicates.
If a duplicate is found, the program should print a message saying which value is duplicated.
If no duplicates are found, the program should print a message indicating that all values are unique.
Example :
Input:
Enter four integers:
Output:
Duplicate value found:
Example :
Input:
Enter four integers:
Output:
All values are unique.
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
