a C program to a determine area of rectangle or tringle  based on the input number using switch-case.

Explanation
In this program, we first prompt the user to choose between calculating the area of a triangle or a rectangle. Based on the user's input, we use a switch-case statement to perform the corresponding calculations.
If the user chooses 1 (triangle), the program prompts the user to enter the base and height of the triangle, calculates the area using the formula (0.5 base height), and then displays the result.
If the user chooses 2 (rectangle), the program prompts the user to enter the length and width of the rectangle, calculates the area using the formula (length * width), and then displays the result.
If the user enters any other choice, the program displays an error message indicating an invalid choice.
This program is a simple demonstration of how you can use a switch-case statement in C to calculate the area of different shapes based on user input. Feel free to modify and expand upon this code as needed for your specific requirements.


Previous :-->> 8.Create a C program to determine the day of the week based on the input number using switch-case.
 -->> NEXT: 10. Write a program in C to check if a year is a leap year using 'if-else' statements.
-->>ALL Conditionl statements Programs