Decision Making Statements (If Else)

  1. Swap the two numbers if they are not Same.
  2. Input Radius, if it is <10 then calculate area of circle else calculate volume of cylinder.
  3. Program to check whether the no is +ve or -ve.
  4. Input Messages sent & calls. Get Mobile Bill as Shown below.
    -> if msg<=50 then rs. .10 per msg else rs. .25.
    -> if calls<=200 then .75 else .95.
    -> add Rs. 100 as rent.
    -> Calculate tax 12.5% if bill<=1000 else 22.5% & get gross bill.
  5. Input Purchase Price(pp) & sale price(sp) & find out profit or loss with amount.
  6. Program for Electric Bill. Follow the instructions written Below:
    if units<=200 ->2
    if units<=400 ->3
    if units<=600 ->4 else 5
    Apply 10% Tax and get gross Bill.
  7. Program to Check no. is +ve ,-ve & zero.
  8. Program to check profit, loss or nothing,& what is the amount.
  9. Program to Check Leap Year.
  10. Greatest of Four numbers using nested if.
  11. Write a program for grade of Student using conditional operators.
  12. Write a Program for greatest of four numbers using conditional operators.