Thursday, May 25, 2023

MODULAR PROGRAMMING 2080 [SEQUENTIAL STRUCTURE] – SEE COMPUTER SCIENCE 2080

  1. Write a program in QBASIC that asks any three numbers and display average and product. Create a user defined function to calculate average and sub program to calculate product.
  2. Write a program in QBASIC that asks any two numbers and display sum and difference. Create a user defined function to calculate sum and sub program to calculate difference.
  3. Write a program in QBASIC that asks any number and display square and cube root of a given number. Create a user defined function to calculate cube and sub program to calculate square root.
  4. Write a program in QBASIC that asks any number and display square and cube root of a given number. Create a user defined function to calculate cube root and sub program to calculate square.
  5. Create a user defined function to calculate simple interest. [I = P* T * R / 100]
  6. Write a sub procedure to calculate distance. DISTANCE = U * T + 1 / 2 * A * T ^ 2
  7. Create a user defined function to calculate area of four walls. A = 2 * H * (L + B)
  8. Write a sub program cost (l,b,h,c) to find the cost of painting the four walls of a room.
  9. Write a sub procedure to calculate area of triangle. A = 1 / 2 * (B * H)
  10. Write a program in QBASIC that asks radius of a circle to calculate its area and circumference. Create a user defined function to calculate area and sub program to calculate circumference.[Hint A=Pr2, C= 2Pr] – SEE 2079
  11. Write a QBASIC Program to read the side of a cube. Calculate its volume using function procedure and calculate surface area using sub procedure. (Hint: vol=side3 and sa=6 side2]
  12. Write a program in QBASIC that ask the radius of circle. Write a program to calculate the area and circumference of a circle. Create a user defined function first (r) to calculate area and sub procedure second (r) to calculate circumference of a circle.
  13. Write a QBASIC program that asks length, breadth, height and calculate volume of Cuboid and Total Surface Area. Create a USER DEFINED FUNCTION to calculate Volume of Cuboid and SUB-PROGRAM to calculate Total Surface of Area. TSA=2*(L*B+B*H+L*H) , VOL=L*B*H
  14. Write a program in QBASIC that asks length, breadth and height of room and calculates its area and volume. Create a user-defined function to calculate area and sub-program to calculate volume. A=L×B, V=L×B×H
  15. Write a program in QBasic that ask the radius and height of a cylinder and calculate the volume and curve surface area. Create a user-defined function to calculate volume and sub-procedure to calculate curve surface area of a cylinder. [Hints: V=πr2h, CSA=2πrh]
  16. Write a program in QBasic that ask the radius and calculate the volume and total surface area. Create a user-defined function to calculate volume and sub-procedure to calculate total surface area of a sphere. [Hints: V=4/3πr2, TSA=4πr2]
  17. Write a program in QBasic that ask the radius and calculate the volume and total surface area. Create a user-defined function to calculate total surface area and sub-procedure to calculate volume of a hemisphere. [Hints: V=2/3πr2, TSA=3πr2]
  18. Write a program in QBASIC to input length and breadth of room and calculate its area using function and perimeter using sub procedure. [Hint: Area = L2. Perimeter = 4×L]
  19. Write a program in QBASIC to input length and breadth and calculate area of square using sub and perimeter using function procedure. [Hint: Area = lxb. Perimeter = 2(l+b)]
  20. Write a program to calculate total surface area of a cylinder using function procedure and volume using sub procedure. [Hint: Total surface area-2pr(r+h), Volume=pr2h] 
  21. Write a program in QBASIC that will asks the user to input length, breadth and height of a room then use SUB procedure calculate its volume and FUNCTION procedure to calculate its area of four walls.
  22. Write a program using Function…..End Function to get temperature in Celsius from the user and then print the temperature in Fahrenheit.(hint: F=9C/5+32)
  23. Write a program to input Fahrenheit and convert it into Celsius using SUB - END SUB. C = (F – 32) * (5 / 9)
  24. Write a program to convert USD(dollar) into NC (NEPALI currency) using DECLARE FUNCTION.
  25. Write a program to convert NC (NEPALI currency) into IC (Indian Currency) using DECLARE SUB and convert NC into Dollar using DECLARE FUNCTION.
  26. WRITE A PROGRAM to ask a number as paisa and convert them into corresponding rupees only solve it using SUB Procedure.
  27. Write a program to input distance in kilometer and convert into meter using function procedure.
  28.   Using FUNCTION……END FUNCTION, write a program to input cost price and selling price from the keyboard to calculate profit and using sub procedure to calculate profit percentage.
  29. Write a qbasic program to calculate loss using sub procedure and loss percentage using function procedure.
  30. Write a program to calculate the area of triangle by using SUB…..END SUB. [Hints: Area= 





No comments:

Post a Comment