Sunday, May 28, 2023

 MODULAR PROGRAMMING 2080

[SELECTION STRUCTURE] 

SEE COMPUTER SCIENCE 2080




  1. WAP to check whether the given no. is divisible by 5 or not using function procedure.
  2. WAP check whether the given no. is divisible by 3 and 7 or not using sub procedure.
  3. WAP to check whether the given no. is positive, negative or zero function procedure.
  4. WAP to input any number and check whether the given no. is positive or negative using sub procedure.
  5. WAP to input a year and display whether that year is a leap year or not. [divisible by 4 but not by 100] using function procedure.
  6. WAP to input any number and display whether it is odd or even using sub procedure.
  7. Input the age of a person and find out whether the person is eligible to drive or not. [age >=16] using sub procedure
  8. Input the age of a person and find out whether the person is eligible to vote or not. [age >=18] using function procedure
  9. WAP to enter any two numbers and display the greater one using function procedure.
  10. WAP to enter any two numbers and display the smaller one using sub procedure.
  11. WAP to enter any three numbers and display the greatest one using sub procedure.
  12. WAP to enter any three numbers and display the smallest one function procedure.
  13. WAP to enter any three numbers and display the middle number using sub procedure.
  14. WAP to enter any three numbers and display the greatest using function and  smallest using sub procedure.
  15. WAP to enter any three numbers and display the difference between greatest smallest number using function procedure.

No comments:

Post a Comment