You are on page 1of 3

ASSIGNMENT NO.

– 2 ( IF ELSE IF AND SWITCH CASE )


Name:- University Enrollment No:-

S.No. Program Description Date of Date of Teacher’s Remarks


Performing checking

1 Write a program to check


whether a is positive,
negative, or zero.
2 Write a program to check
whether a number is even
or odd.
3 Write a program to check
the greatest of two
numbers.
4 Write a program to check
the eligibility of voting.
5 Write a program to check
whether two numbers are
equal or not.
6 Write a program to check
whether an employee is
senior accountant.
7 Write a program to check
whether the student stood
first, second, third or fail in
PCM.
8 Write a program to find
whether the gender in
male, female or
Transgender.
9 Write a program to check
whether entered is vowel
or consonant.
10 Write a program to find
the day week from
character entered by the
user.
11 Write a program to check
whether the two names
entered by the user are
similar or not.
12 Write a program to find
the greatest of three
ASSIGNMENT NO. – 2 ( IF ELSE IF AND SWITCH CASE )
Name:- University Enrollment No:-

numbers using else if and


logical operators.
13 Write a program to enter
the gender and age and
then find the eligibility for
marriage.
14 Write a program to read
the roll number, marks of
three subjects.
15 Write a program to
calculate the electricity
bill, A surcharge of 20% is
applicable on total bill
16 Write a program to check
whether the year is leap or
not.
17 Write a program to display
the day of week depending
upon the first character of
day entered by user.
18 Write a program to check
the character whether the
character entered is vowel
or not using switch only.
19 Write a program to
perform the calculation
(addition, subtraction,
multiply, division ) as the
symbol entered (using
switch statement).
20 Write a program to find
the number of days in the
month according to the
month number entered by
the user (using switch
statement).
21 . Write a program to find
the area any switch
statement
1. Area of circle
2. Area of Rectangle
3. Area of right-angled
ASSIGNMENT NO. – 2 ( IF ELSE IF AND SWITCH CASE )
Name:- University Enrollment No:-

triangle.

You might also like