Functions activity

473 views

Published on

hands on activity to learn qbasic library functions

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Functions activity

  1. 1. Type the program and run it.
  2. 2. What is the output of this program?CLSREAD num1num2 = ABS(num1)PRINT num2ENDDATA 12
  3. 3. What is the output of this program?CLSREAD num1num2 = ABS(num1)PRINT num2ENDDATA – 4
  4. 4. What does ABS function do?
  5. 5. What is the output of this program?CLSREAD numPRINT SQR(num)ENDDATA 9
  6. 6. What does SQR function do?
  7. 7. Write the output of this program.CLSREAD numPRINT FIX(num)ENDDATA 7
  8. 8. Write the output of this program.CLSREAD numPRINT FIX(num)ENDDATA – 16
  9. 9. What does FIX function do?
  10. 10. Write the output of this program.CLSREAD numPRINT FIX(num)ENDDATA 7.3
  11. 11. Write the output of this program.CLSREAD numPRINT FIX(num)ENDDATA 7.9
  12. 12. What does FIX function do?
  13. 13. Write the output of this program.CLSREAD numPRINT FIX(num)ENDDATA – 7.9
  14. 14. What does FIX function do?
  15. 15. Write the output of this program.CLSREAD numPRINT INT(num)ENDDATA 5.3
  16. 16. What does INT function do?
  17. 17. Write the output of this program.CLSREAD numPRINT INT(num)ENDDATA – 23.12
  18. 18. What does INT function do?

×