Programs for Lab Internal 1

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

1. Check whether a number is negative, positive or zero.

2. Check whether a number is divisible by 5 and 11 or not.


3. Check whether a number is even or odd.
4. Check whether a year is leap year or not.
5. Check whether a character is alphabet or not.
6. Input any alphabet and check whether it is vowel or consonant.
7. Check whether a character is uppercase or lowercase alphabet.
8. Input week number and print week day.
9. Input month number and print number of days in that month.(using switch)
10. Write the C program to find maximum between three numbers.
11. Write the C program to find the Largest and Smallest of Three numbers using Ternary
operator
12. Input angles of a triangle and check whether triangle is valid or not.
(If sum=180 then, triangle can be formed otherwise not. In addition, make sure angles
are greater than 0 i.e. check condition for angles if(angle1>0 && angle2>0 &&
angle3>0).
13. Input all sides of a triangle and check whether triangle is valid or not.
(A triangle is valid if sum of its two sides is greater than the third side. Means if a, b, c
are three sides of a triangle. Then the triangle is valid if all three conditions are satisfied
a + b > c, a + c > b and b + c > a)
14. Find all roots of a quadratic equation.
15. Input cost price and selling price of a product and check profit or loss. Also calculate total
profit or loss.
16. Input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer.
Calculate percentage and grade according to following:

Percentage >= 90% : Grade A

Percentage >= 80% : Grade B

Percentage >= 70% : Grade C

Percentage >= 60% : Grade D

Percentage >= 40% : Grade E

Percentage < 40% : Grade F

17. Input basic salary of an employee and calculate its Gross salary according to following:

Basic Salary <= 10000 : HRA = 20%, DA = 80%

Basic Salary <= 20000 : HRA = 25%, DA = 90%


18. Basic Salary > 20000 : HRA = 30%, DA = 95%
19. Input any character and check whether it is alphabet, digit or special character.
20. Write an Algorithm, Flowchart and C program to display n terms of natural number and
their sum
21. Write an Algorithm, Flowchart and C program to read 10 numbers from keyboard and
find their sum and average
22. Write an Algorithm, Flowchart C program to display and find the sum of the cube of the
number up to given an integer.
23. Write an Algorithm, Flowchart and C program to display the cube of the number upto
given an integer.
24. Write an Algorithm, Flowchart and C program to display the multiplication table of a
given integer.
25. Write an Algorithm, Flowchart and C program to display the n terms of odd natural
number and their sum.
26. Write the C program to find the number and sum of all integers between 100 and 200
which are divisible by 9
27. Write an Algorithm, Flowchart and C program to calculate the factorial of a given number
28. Write an Algorithm, Flowchart and C program to display the n terms of square natural
number and their sum.
29. Write an Algorithm, Flowchart and C program to check whether a given number is an
armstrong number or not.
30. Write the C program to check whether a number is a palindrome or not.
31. Write an Algorithm, Flowchart and C program to determine whether a given number is
prime or not.
32. Write an Algorithm, Flowchart and C program to display the first n terms of Fibonacci
series.
33. Write the C program to to find the largest and the least of some numbers given by the user
34. Write an Algorithm, Flowchart and C program to find the sum of digit of a given number

You might also like