Java Practice Questions on if else statements

  1. Write a program to check a number is divisible by 7 or not.
  2. Write a program to check a number is factor of 84 or not.
  3. Write a program to check a number is factor of 96 or not.
  4. and if the given number is more Than 96 program should say ‘not a valid input’
  5. Write a program to check a number is multiple of 3 or not.
  6. Write a program to check a number is positive or not.
  7. Write a program to check a number is having 4 at units place (984).
  8. Write a program to check a number is 3 digited number or not.
  9. Write a program to print even or odd for a given number
  10. Write a program to print the greatest number in given two numbers
  11. Write a program to print the least number in given two numbers
  12. Write a program to print the given two numbers in ascending order
  13. Write a program to print the given two numbers in descending order
  14. Write a program to print the greatest number in given three numbers
  15. Write a program to print the least number in given three numbers
  16. Write a program to print the given three numbers in ascending order
  17. Write a program to print the given three numbers in descending order
  18. Write a program to take marks of three subjects and print the grade of student
  19. Character Is Vowel or Consonant
  20. A Character Is an Alphabet or Not
  21. Uppercase, Lowercase, Special Character, or Digit
  22. Leap Year
  23. The Date Is Correct or Not
  24. Voting Eligibility Checker
  25. Check whether a number is negative, positive or zero.
  26. Check whether a number is divisible by 5 and 11 or not.
  27. Input any alphabet and check whether it is vowel or consonant.
  28. Input any character and check whether it is the alphabet, digit or special character.
  29. Check whether a character is an uppercase or lowercase alphabet.
  30. Input week number and print weekday.
  31. Input month number and print number of days in that month.
  32. Count the total number of notes in a given amount.
  33. Input angles of a triangle and check whether the triangle is valid or not.
  34. Check whether the triangle is an equilateral, isosceles or scalene triangle.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *