PICL Assi3 - Write A C Program To Relate Two Integers Using, - or - Using Nested Ifs Multiple Ifs Switch Case
PICL Assi3 - Write A C Program To Relate Two Integers Using, - or - Using Nested Ifs Multiple Ifs Switch Case
Faculty of Engineering
CSE- Academic Year 2024-25
Data Structures – Lab Batch 2023-27
Lab Assignment No:- 3
Name of Student
PRN No.
Batch
Class
Date of Performance
Title of Assignment: Write a C Program to relate two integers using =, > or < using
a. nested ifs & multiple ifs
b. switch case
Theory Questions: 1. Explain the purpose of using nested if statements in this C program.
2. Discuss the significance of using relational operators (=, >, <) in
programming.
3. Discuss format of switch case
Algorithm & Flow
Chart and Source
Code
Output Screenshots
Practice questions Write a C program to find the maximum of three integers using nested if
statements.
● Develop a C program to check if a given year is a leap year or not using
conditional
statements.
● Create a C program to calculate the factorial of a given number using a
loop and if
statements.
Conclusion The C program successfully compares two integers using the relational
operators =, >,
and <, employing nested if statements and multiple conditions. The program
effectively
determines the relationship between the two input integers and provides the
corresponding output.