This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

:

**Practice! And be motivated
**

Calculate the total monthly net pay of each employee and generate the output report. Write a Basic program to input the records of a file where each record contains the identity of a person, the amount of loan in Naira he obtains (the principal), the interest rate of the loan and the number of payment period per year. The program should compute the loan payment required for each pay period to repay the outstanding principal in one year at the indicated rate in N equal payments. The formula for calculating payment is: Payment = (p(1+k) + 12)/n where p = principal loan k = interest rate n = number of periods per year

Solution Program 10 CLS 20 REM set previous key settings off 30 KEY OFF 40 REM enter the number of the debtors 50 INPUT "please enter the number of debtors to consider ", d 60 CLS 70 DIM A$(d), B$(d), C(d), D(d), E(d), F(d) 80 REM create a FOR and NEXT loop to accept the records of debtors 90 FOR I = 1 TO d 100 INPUT "surname:", A$(I) 110 INPUT "other names:", B$(I) 120 INPUT "principal loan", C(I) 130 INPUT "interest rate", K(I) 140 INPUT "payment period per year:="; E(I) 150 REM compute the payment per period for each debtor 160 F(I) = (C(I) * (1 + K(I)) + 12) / E(I) 170 CLS 180 NEXT I 190 CLS 200 REM print the report 210 FOR I = 1 TO d

Practice make permanent

C(I). E(I). nums(loop2) NEXT NEXT FOR i = 0 TO 9 PRINT nums(i) NEXT Practice make permanent . K(I).CSC 104 Knowledge of the QBASIC programming language: 220 PRINT A$(I). F(I) 220 NEXT I 230 END Write a Qbasic program to find the root of a quadratic equation using the formula if the result is less than 0 the program should print the root are imaginary and end the program? What are the Disadvantages of qbasic? Write an algorithm to convert the length in feet to centimeter. B$(I). Algorithm START Input Length_in_ft Length_in_cm = Length_in_ft x 30 Print Length_in_cm END Write a program to sort ten numbers? Solution: DIM nums(10) CLS FOR i = 0 TO 9 nums(i) = (RND * 10) + 1 PRINT nums(i) NEXT PRINT PRINT "Press Enter to sort numbers" REM pause to look at numbers FOR W=1 TO 100 NEXT W CLS FOR loop1 = 0 TO 9 FOR loop2 = loop1 + 1 TO 9 IF nums(loop1) > nums(loop2) THEN SWAP nums(loop1).

Enter your name Date of Birth Class Output Screen should look like: NameBirth dateClass Baron21/08/001 Production&Meta Practice make permanent . opNo% SELECT CASE opNo% CASE 1: answer = num1 + num2 CASE 2: answer = num1 . nm * nm1 GOTO 140 130 PRINT "The result is". Subtract 3." 40 INPUT nm.n)" INPUT num1. nm / nm1 Enter the first of four numbers: Enter the second of four numbers: END 140 END Q10: Write algorithms and programs that will result in the following outputs. Add 2. answer Solution:Using IF/THEN 10 CLS 20 PRINT "Welcome to the QBasic Calculator!" 30 PRINT "Enter two numbers. nm + nm1 GOTO 140 110 PRINT "The result is". Divide" 70 INPUT num 80 IF num = 1 THEN 100 90 IF num = 2 THEN 110 91 IF num = 3 THEN 120 92 IF num = 4 THEN 130 100 PRINT "The result is". nm .num2 CASE 3: answer = num1 * num2 CASE 4: answer = num1 / num2 END SELECT PRINT "The answer is: ". num2 PRINT "Choose a basic operation:" PRINT "MENU: 1> Add 2> Subtract 3> Multiply 4> Divide" INPUT "Type a menu selection number from 1 to 4".CSC 104 Knowledge of the QBASIC programming language: Write a simple but a complete Qbasic that will accept three numbers find the sum and the average of these numbers? How do you create a calculator on QBasic? Solution:Using SELECT/CASE CLS PRINT "Welcome to the QBASIC Calculator!" PRINT "Enter two numbers each separated by a comma: (n. Make use of the INPUT statement. nm1 50 PRINT "Choose a basic operation:" 60 PRINT "1.nm1 GOTO 140 120 PRINT "The result is". Multiply 4. 1.

LET X = 3. 3. Differentiate the following 1. READ.142 is printed d. 7.##" PRINT USING F$.14159 is printed b. Use the FOR-TO and NEXT statements Write a Qbasic program which generates the multiples of 5 between 5 and 50 and prints the results. 3. 3. Write a Qbasic program which finds the areas of ten rectangles one after the other and prints the results.14159 LET F$ = "#.1416 is printed c.X a. Write a Qbasic program which reads the value of the ages of 60 pupils in a school. 2. average age of the pupils and prints the number of pupils.CSC 104 Knowledge of the QBASIC programming language: Enter the third of three numbers: Enter the fourth of four numbers: The sum of the numbers is: The Average of the numbers is: Choose the answer that describes the result when this segment of code is executed. Use a PRINT statement to display the answers to the user. 4. 3.14 is printed Write a program in qbasic to print the multiplication table of 15? Write a FOR loop that finds the average of the numbers between 1 and 1000. 5. finds the sum of the ages. 6. DATA & INPUT PRINT & PRINT USING VAL & STR$ SINGLE SUBSCRIPTED VARIABLE & DOUBLE SUBSCRIPTED VARIABLE MID$ $ LEFT$ INT & FIX STOP & END Practice make permanent . sum of their ages and average age. 3.

$ % $ #573990705479 #% / 9fnn¯f½¯f°° .

.

.

9.223.8.06:.2 .3/03/905747.2 790.03920907 4792 $%#% 35:9039*3*19 039*3*.39.284:/5739907449.°4190"$5747.5747.8.2039*3*19 !739039*3*.9.943:83901472:.08416-.3.3./7..479294.6:.3:.29413/90744941.7./.702.5747.43.0 !#% % 790."-.93:2-078 #% % $ #445 % #445445 % 3:28 445 3:28 445 %$!3:28 445 3:28 445 % % # % !#%3:28 % 9fnn¯f½¯f°° .70908.190708:98 0889. 790.29484799033:2-078 $4:943 3:28 $ # % 3:28 # !#%3:28 % !#% !#%!708839079484793:2-078 #5.3 905747.079900393100994.:809444.

.

.

9. $4:943&83$%.°4190"$5747..223...:.94743"..0 790..70.8.05997003:2-07813/90 8:2..07.04190803:2-078 4/44:.8250-:9.8.425090"-..9.90.3:.3/90.

..9:95.7.947 !#%3907943:2-0780. 3 3 !&%3:2 3:2 !#%4480.$ $ !#%0.8.805.422.:.4209490"$.9433:2-07174294454 $%$454 $.38073:2 3:2 $.38073:2.943 !#%&//$:-97.38073:2 3:2 $.203:800..4507./0 !&%%50.-.38073:2 3:2 $..90/-.

38078.3:2 $% !#%%0.3807 $4:943&83.

% $ !#%0.8.943 !#%//$:-97.9:95 ..-.:..4209490".8.4507.947 !#%3907943:2-078 !&%32 32 !#%4480../0 !&%3:2 3:2% 3:2% 3:2% 3:2% !#%%0708:9832 32 % !#%%0708:9832 32 % !#%%0708:9832 32 % !#%%0708:9832.

88 .20 .9708:93 9014434:95:98 .902039 39074:73.0:804190!&% 89.43/4114:73:2-078 " 790.904179 .2079/.88 :95:9$.289.700384:/44 0 .47928.90.3/ 5747.743.32 39079017894114:73:2-078 39079080.

.

943 09. !74/:. 9fnn¯f½¯f°° .

.

.

.308430.5747.3/57398903:2-07415:58 8:241907.1907904907.3/5739890 708:98 790.041905:58.13/890.2.041903:2-0788 448090.8."-.8.8..07."-.9/08.44 13/8908:2 4190.4/0800.0 1107039.908902:950841-09003.07.7-0890708:9039880203941.08 .84190370.857390/ /857390/ 790.223.2.3/ .9020398 790.0.3/ .9.90203994/85.0.08.3/%89.236-.2.3/ &80.90.8.90901443 #% !&% !#% !#%&$ ' $%# $$&$#!%'# &$&$#!%'# % % $% ! 9fnn¯f½¯f°° ..5747.07.0841 5:583.857390/ -857390/ .-041 790.°4190"$5747.5747.9439.!#% 89.70.07.70.38079.0 39079097/4197003:2-078 39079014:794114:73:2-078 %08:241903:2-0788 %0.3/5739890 708:98&8090 # % .5747.380789490:807 790.3:.041903:2-078-09003.945739902:95.:04190../890.913/890. #4459..0307."-.8.:90/ % % !#%&$ .

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd