Programs on If Statement

  1. WAP to read a number and check if it is even or odd
  2. WAP to read 2 numbers and check if their last digit is same of not
  3. WAP to read 3 angles and check if triangle can be formed or not
  4. WAP to read 3 angles and check if it is and equilateral triangle or not
  5. WAP to read marks for 5 subjects and check if student is passed or not
  6. WAP to read 2 numbers and find the greatest of them
  7. WAP to read 3 numbers and find the greatest of them
  8. WAP to read 3 digit number and check if the sum of cube of its digits is equal to that number or not
  9. WAP to read 3 numbers and check their last digit is same or not
  10. WAP to read 3 numbers and check their last digit is same or not
  11. WAP to read marks of 5 subjects and print their total. Also print percentage and check if student is passed or not.
  12. WAP to read 3 angles and check if triangle can be formed or not. If triangle can be formed then check it it is equilateral, isosceles or right angled triangle
  13. WAP to read age and genger of person and check if person is Eligible for marriage or not
  14. WAP to read a year and check if it is Leap year or not
  15. WAP to read a Salary of Employee and print commission according to following Criteria
    SAL               Commision
    <10000             10%
    10000-20000   12%
    >20000             15%
  16. WAP to read percentage of student and print Div
    >=75 : 1st class with distinction
    60-75: 1st class
    50-60: 2nd class
    40-50: 3rd class
    <40: fail

Leave a Reply

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