Lab Assignment 3: Name - Sachin Kumar Gupta Roll No. - 21075074 ID
Lab Assignment 3: Name - Sachin Kumar Gupta Roll No. - 21075074 ID
CSO101
ID – [email protected]
Programme 1 :
Write a C program to implement a calculator which
performs +, -, \, * operations using switch case.
Output :
Programme 2:
Write a C program to get marks from the user and
assign the following grades and print it.
Mark Grade
<50 F
50-70 C
70-90 B
>90 A
Output:
Programme 3:
Write a C program to print if a number is odd or even.
Output:
Programme 4:
Write a C program to find the roots of a quadratic
equation. You should print the roots even if they are
complex.
Output:
Programme 5:
Write a C program to implement the modulus
function without using modulo operator.
Output:
Programme 6:
Write a C program to test if the numbers entered can
form sides of a triangle or not.
Output:
Programme 7:
Write a C program to print the name given numeric value of a month. For example it
should print November if 11 is entered and error if any number less than 1 or greater than
12 is entered.
Output:
Programme 8 :
Write a C program to find if a given year is leap year
or not.
Output:
Programme 9:
Write a C program to print the sine of the value
entered if choice is 1 or cosine if choice is 2. If any
other value is entered, then it should return tan of
the value.
Output: