0% found this document useful (0 votes)
2 views1 page

C Programming Assignment Solutions

The document outlines a C programming assignment consisting of seven tasks. These tasks include writing programs to check if a number is even or odd, find the maximum of three numbers, determine if a year is a leap year, assign grades based on marks, check divisibility conditions, print the day of the week using a switch case, and create a basic calculator. Each task requires specific programming logic and conditions to be implemented.

Uploaded by

nitesh meena
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

C Programming Assignment Solutions

The document outlines a C programming assignment consisting of seven tasks. These tasks include writing programs to check if a number is even or odd, find the maximum of three numbers, determine if a year is a leap year, assign grades based on marks, check divisibility conditions, print the day of the week using a switch case, and create a basic calculator. Each task requires specific programming logic and conditions to be implemented.

Uploaded by

nitesh meena
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C Programming - Assignment 2

*WAP – Write a Program

1. WAP to check given number (from user) is even or odd.

2. WAP to find maximum between three numbers using nested if.

3. WAP to check given year is leap year or not.

4. WAP to read the subject mark and assign grade according to the following conditions.
 If 90 > marks <= 100 – AA
 If 80 > marks <= 90 – AB
 If 65 > marks <= 80 – BB
 If 50 > marks <= 65 – CC
 If 35 > marks <= 50 – CD
 If marks <= 35 – FF

5. WAP to check that the given no is divisible by 6 but not divisible by 4, number lies in
between 1 to 100.

6. WAP that use switch case to print the day of the week as Monday to Sunday according to
the number in between 1 to 7 given by user.

7. WAP to make a basic calculator using switch case (Addition, Subtraction, Multiplication,
Division, and 𝑥 𝑦 operations should be handle by the calculator).

You might also like