CP Lab QB
CP Lab QB
Department of
1) a. Write a C program to find the maximum of three numbers using conditional operator ?
b. Write a C program to take marks of 5 subjects in integers, and find the total, average in float ?
2) a. Write a C program to find the maximum of three numbers using if-else-if statement?.
b. Write a C program to find the given year is leap year or not?
3) a. Write a C program to generate electricity bill?
b. Write a C program to find the given number is even or odd?
4) a. Write a C program to simulate a calculator using switch case?
b. Write a C program to find the given year is leap year or not?
5) a. Write a C program to find the factorial of given number using for loop?
b. Write a C program to find the given number is a prime or not?
6) a. Write a C program to check whether the given number is palindrome or not?
b. Write a C program to find sum of first " n" natural numbers?
7) a. Write a C program to find whether the given number is armstrong or not?
b. Write a C Program to print the right angle triangle for the given pattern,
**
***
****