0% found this document useful (0 votes)
4 views2 pages

Essential Programming Exercises List

Uploaded by

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

Essential Programming Exercises List

Uploaded by

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

 Write a program to print "Hello World".

 Write a program to add two numbers.

 Write a program to subtract two numbers.

 Write a program to multiply two numbers.

 Write a program to divide two numbers.

 Write a program to find the remainder of two numbers.

 Write a program to calculate the square of a number.

 Write a program to calculate the cube of a number.

 Write a program to swap two numbers.

 Write a program to calculate the average of two numbers.

Write a program to check if a number is positive.

 Write a program to check if a number is negative.

 Write a program to check if a number is zero.

 Write a program to check if a number is even.

 Write a program to check if a number is odd.

 Write a program to check if a number is divisible by 5.

 Write a program to check if a character is a vowel.

 Write a program to check if a person is eligible to vote (age ≥ 18).

 Write a program to check if a number is greater than 100.

 Write a program to check if a password entered is correct.

 Write a program to check if a number is odd or even.

 Write a program to check if a number is positive or negative.

 Write a program to check if a person is eligible to vote or not.

 Write a program to find the greater number between two numbers.

 Write a program to check if a year is a leap year or not.

 Write a program to check if entered password is valid or invalid.

 Write a program to check if a number is divisible by 7 or not.

 Write a program to check if a number is single-digit or double-digit.


 Write a program to check whether a character is uppercase or
lowercase.

 Write a program to check whether a string has even length or odd


length.

21. Write a program to check if a number is positive, negative, or


zero.

22. Write a program to calculate grade based on marks:

 90 & above → Grade A

 75–89 → Grade B

 50–74 → Grade C

 Below 50 → Fail

23. Write a program to display the day of the week (1 for Monday,
2 for Tuesday, …).

24. Write a program to find the largest among three numbers.

25. Write a program to check if a person is eligible for blood


donation (age ≥ 18 and weight ≥ 50).

26. Write a program to check the type of triangle (Equilateral,


Isosceles, Scalene).

27. Write a program to classify a person by age (Child, Teenager,


Adult, Senior Citizen).

28. Write a program to display traffic signal rules (Red → Stop,


Yellow → Get Ready, Green → Go).

29. Write a program to check the state of water based on


temperature (Solid, Liquid, Gas).

30. Write a program to perform ATM withdrawal with balance


check.

You might also like