The document outlines a lab assignment consisting of various C programming tasks. These tasks include creating a calculator, assigning grades based on marks, checking if a number is odd or even, finding roots of a quadratic equation, and more. Each task focuses on implementing decision-making and branching using constructs like switch case and conditional operators.
The document outlines a lab assignment consisting of various C programming tasks. These tasks include creating a calculator, assigning grades based on marks, checking if a number is odd or even, finding roots of a quadratic equation, and more. Each task focuses on implementing decision-making and branching using constructs like switch case and conditional operators.
1. Write a C program to implement a calculator which performs +, -, \, * opera ons
using switch case. 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
3. Write a C program to print if a number is odd or even.
4. Write a C program to nd the roots of a quadra c equa on. You should print the roots even if they are complex. 5. Write a C program to implement the modulus func on using condi onal operator. 6. Write a C program to test if the numbers entered can form sides of a triangle or not. 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 8. Write a C program to nd if a given year is leap year or not. 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. fi fi ti ti ti ti ti