Comprehensive review questions covering all 9 sessions. Perfect for students returning after a break!
Create a program that prints your name and age on separate lines.
Write a program that displays:
Write a program that asks for user's name, age, and favorite number, then displays all the information.
Write a program that takes two numbers from the user and displays them with labels.
Declare variables for storing: your age (int), height in meters (float), first initial (char), and display all three.
Write a program that takes an integer and a float, adds them, and displays the result. Observe what happens.
Write a program that takes two numbers and displays the result of addition, subtraction, multiplication, and division.
Write a program to calculate and display the area of a rectangle (length Γ width) and circle (Ο Γ radiusΒ²).
Write a program that takes three test scores and calculates the average.
Write a program to convert Celsius to Fahrenheit using the formula: F = (C Γ 9/5) + 32
Write a program that calculates: (a + b) Γ (c - d) / 2, where a, b, c, d are user inputs.
Write a program that takes a number and displays whether it's even or odd using the modulo operator.
Write a program that asks for age and displays "You are an adult" if age >= 18, otherwise "You are a minor".
Write a program that takes two numbers and displays which one is larger, or if they are equal.
Write a program that takes a score and displays "Pass" if score >= 50, otherwise "Fail".
Write a program that takes a score and displays:
β’ A if score >= 90
β’ B if score >= 80
β’ C if score >= 70
β’ D if score >= 60
β’ F otherwise
Write a program that checks if a person can vote (age >= 18) AND has an ID card (1=yes, 0=no).
Write a program that checks if a number is positive, and if it's even or odd. Use nested if statements.
Write a program with a menu:
1. Display "Hello"
2. Display "World"
3. Display "Goodbye"
Use switch statement to handle the choice.
Create a menu-driven calculator using switch:
1. Addition
2. Subtraction
3. Multiplication
4. Division
Take two numbers and perform the selected operation.
Write a program that groups weekdays (1-5) and weekends (6-7) using case grouping in a switch statement.
Write a program that:
1. Takes student name, age, and marks in 3 subjects
2. Calculates total and average
3. Displays grade based on average (A, B, C, D, F)
4. Uses if-else or switch for grading
Create a complete calculator with menu:
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Modulo
Use switch statement. Handle division by zero.
Write a program that classifies age:
β’ Child: < 13
β’ Teen: 13-19
β’ Adult: 20-64
β’ Senior: >= 65
Use if-else chain or switch with case grouping.