Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,803 members, 7,824,341 topics. Date: Saturday, 11 May 2024 at 08:35 AM

Qbasic Programmers Please Help - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Qbasic Programmers Please Help (887 Views)

Qbasic Programmers SOLVE THIS QUESTIONS / I'm Having A Problem With This Qbasic. Who Can Help? / Can Qbasic Interact With Any DBMS ? (2) (3) (4)

(1) (Reply) (Go Down)

Qbasic Programmers Please Help by anisylva(m): 8:25pm On Mar 12, 2015
please i need some help coding in qbasic,
1- write a program to read a set of real numbers and sort the numbers in desending order using bubble sort.
2- write a program that prints the index of the largest value stored in an array.
3- write a program to compute the sum of column elements of an array.
Re: Qbasic Programmers Please Help by HCpaul(m): 7:59am On Mar 15, 2015
Nairaland is not the best community for this. Only but a few programmers are still coding in QBasic today. There are many communities for QBasic online. I mean the espert in the language. Just try to search a little bit. Although, i would have help, but have dropped the language as it is limited in my target.
Re: Qbasic Programmers Please Help by elfico(m): 6:11pm On Mar 15, 2015
these questions are not very difficult., just google each one and am sure you would get a lot of anwsers. If you dont, then i can assist you.
Re: Qbasic Programmers Please Help by anisylva(m): 2:59am On Mar 16, 2015
tnx guys, i'm trying
Re: Qbasic Programmers Please Help by kudaisi(m): 5:20am On Mar 30, 2015
I employ to however study the code and understand how it works. Understanding qbasic is a learning platform for other programming languages. So it was for me anyway.
Re: Qbasic Programmers Please Help by kudaisi(m): 5:21am On Mar 30, 2015
Try this, I coded and tested it with qbasic 4.5 should work fine.

LET ITEMS = 100
DIM A(ITEMS)
LET LARGEST = 0
LET LARGESTINDEX = 0
RANDOMIZE TIMER / 3
PRINT "PRINTING UNSORTED LIST"

' CREATE RANDOM NUMBERS
' PRINT THE NUMBERS AS THERE ARE CREATED
' COMPARE THE NUMBERS FOR THE HIGHEST
FOR NUM = 1 TO ITEMS
LET A(NUM) = INT(26 * RND) + 25
PRINT A(NUM)
IF A(NUM) > LARGEST THEN
LARGEST = A(NUM)
LARGESTINDEX = NUM
END IF
NEXT NUM

'DO THE SORTING
FOR OUTER = 1 TO ITEMS - 1
PRINT OUTER;
FOR INNER = OUTER + 1 TO ITEMS
IF A(OUTER) <= A(INNER) THEN GOTO NOCHANGE
SWAP A(OUTER), A(INNER)
NOCHANGE:
NEXT INNER
NEXT OUTER

PRINT "SORTED LIST:"
FOR NUM = 1 TO ITEMS
PRINT A(NUM),
NEXT NUM

PRINT "THE INDEX OF THE LARGEST NUMBER IS"; LARGESTINDEX

FOR NUM = 1 TO ITEMS
LET SUM = SUM + A(NUM)
NEXT NUM
PRINT "THE SUM OF THE NUMBERS IS: "; SUM
END
Re: Qbasic Programmers Please Help by anisylva(m): 7:34am On Mar 30, 2015
tnx guys

(1) (Reply)

Free Training / Making Reasonable Promises / Advance Script

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.