SEE Programming in QBasic
SEE programming in Qbasic is the solution of the programming in Qbasic part of Computer Science of Class 10. SEE programming in Qbasic is of 18 marks where the highest marks is of writing the qbasic program that is Q14. There are 3 questions and each is of 3 marks. This is the solution for the 9 marks.
1. Write a program using FUNCTION…….END FUNCTION to get a word from the user and then print the word in reverse order.
DECLARE FUNCTION REV$(A$)
PRINT “REVERSE OF THE WORD”;REV$(A$)
FOR I=LEN(A$) TO 1 STEP -1
R$=R$ + MID$(A$,I,1)
2. Write a program using SUB…..END to get radius of circle and then print area.
DECLARE SUB AREA(R)
SUB AREA( R)
PRINT “AREA OF CIRCLE”;A
3. A sequantial date file called ‘MARKS DAT’ contains Roll No., Name, English, Nepali and Maths fields. Write a program to display all the contents of the data file.
OPEN “MARKS.DAT” FOR INPUT AS $1
WHILE NOT EOF(1)
INPUT #1, R,N$,E,NE,M