Q8: Draw the flowchart and write a C program using switch. The program inputs one character selector and three integer numbers. Depending on the selector, the program performs some operations on the integer numbers and displays the output. [4+5]
Selector:
Operations on integer numbers: Displaying the sum of the squares of the numbers.
Sors:
Aora:
Displaying the average of the numbers.
Eore:
Displaying the sum of even numbers and their count.
Other characters:
Wrong Selector
Sample output 1:
Input a character selector: S
Input 3 integers: 147, -4
Sum of the square of these numbers: 261
Sample output 2:
Input a character selector: a
Input 3 integers: 147, -4
Wrong Selector
Sample output 3:
Input a character selector: E
Input 3 integers: 147, -4
Sum of even numbers: 10
Sample output 4:
Input a character selector: K
Input 3 integers: 147, -4
Average of numbers: 5.666667