Conditional Statements(If-else and Switch):

Q1: Write a program that takes an integer as input and checks whether it is even or odd using conditional statements. Display an appropriate message.

Q2: Create a program that takes a user's age as input and determines if he is eligible to vote (18 years or older) or not using conditional statements.

Q3: Write a program that takes three numbers as input and finds the largest among them using if-else statements.

Q4: Create a program that calculates the total cost of purchasing items in a shopping cart. The program should ask for the price and quantity of each item and apply a discount if the total cost exceeds a certain amount using if-else statements.

Q5: Use switch statement to make a simple calculator.

Q6: Write a program that asks the user for a grade (A, B, C, D, or F) and provides a message indicating their performance (e.g., "Excellent," "Good," "Satisfactory," "Pass," "Fail") using a switch statement (C, C++, Java) or if-else statements (Python).

Q7: Write a program that takes three integers as input and determines if they can form the sides of a triangle. If yes, specify whether it's an equilateral, isosceles, or scalene triangle.

Q8: Create a program that simulates a simple ATM machine. Allow users to check their balance, deposit funds, and withdraw money. Ensure that the user cannot withdraw more money than their account balance. Use if-else statements for handling these operations.

Q9: Write a program that calculates the income tax based on the annual income of a person. The tax rates can vary depending on the income range. Use conditional statements to determine the tax amount.