CP Lab-2

Post date: Oct 17, 2017 10:24:07 AM

Q1. Write a C Program to Make a Simple Calculator to perform the basic arithmetic operations (+, -, *, /) using switch case. Your program should ask user for an arithmetic operator (+, -, *, /) and two operands and performs the operation on those two operands. Enter operator either: * Enter two operands: 6.5 4.25 The operations output is 6.5 * 4.25 = 27.625 2. Write a C program to read 5 subjects marks of a student and calculate his/her Total and Average. (use if else) And print the result as following criteria Average > 80% print DISTINCTION, Average >69 & <79 print CLASS I, Average >59 & <68 print CLASS II, Average >49 & < 58 print CLASS III, Average >38 & < 48 print AVERAGE and if Average below 37% print FAIL