Practice Flowchart
Practice Flowchart
1. Write a C program to accept two integers and check whether they are equal or not.
Input : 18 18
Expected Output :
Number 1 and Number 2 are equal
4. Write a C program to find the perimeter of a rectangle. Length and Width of the rectangle will be
provided by the user from the keyboard.
5 10 30
12 36 96
6. Write a C program where the user first inputs ‘q’ or ‘r’ If the input is q then find the quotient
from the division of two numbers and if the input is r then find reminder.
Sample Input Sample Output
q 5
32 6
r 1
63 2
7. Write a program that asks the user for an integer and then prints whether the number is even or
odd.
7 odd
12 even
8. Write a program that asks the user for their age and then prints whether they are eligible to vote
(age 18 or older).
Input : 7 9
Expected Output :
10. Create a calculator with 4 options. The user will input 2 numbers and a character like +, - , *
and / symbol. Based on the character input the program will complete the action of addition
subtraction multiplication or division and show result
+ 65
63 2
11. Write a C program to read temperature in centigrade and display a suitable message according
to the temperature state below:
Input :
42
Expected Output :
12. Write a program that asks the user for three integers and then prints the smallest of the three.