Draw the flowchart then write the C program using switch. The program reads wo marks for a student. Then it reads one integer number opr. According to he value of opr, the program will do some operation on the two marks ccording to the following table: Value of opr Required operation Calculating then displaying average of the two marks. 3 5 or 7 Displaying the maximum mark. Calculating then displaying the difference between the two marks. Any other value Wrong Operation

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 15E: (Program) Write a program to simulate the rolling of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question
Draw the flowchart then write the C program using switch. The program reads
two marks for a student. Then it reads one integer number opr. According to
the value of opr, the program will do some operation on the two marks
according to the following table:
Value of opr
Required operation
Calculating then displaying average of the two marks.
Displaying the maximum mark.
Calculating then displaying the difference between the
two marks.
3
5 or 7
9.
Any other value
Wrong Operation
Transcribed Image Text:Draw the flowchart then write the C program using switch. The program reads two marks for a student. Then it reads one integer number opr. According to the value of opr, the program will do some operation on the two marks according to the following table: Value of opr Required operation Calculating then displaying average of the two marks. Displaying the maximum mark. Calculating then displaying the difference between the two marks. 3 5 or 7 9. Any other value Wrong Operation
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning