₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,111 members, 8,420,409 topics. Date: Thursday, 04 June 2026 at 06:47 PM

Toggle theme

Qbasic Programmers Please Help - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingQbasic Programmers Please Help (987 Views)

1 Reply (Go Down)

Qbasic Programmers Please Help by anisylva(op): 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(op): 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(op): 7:34am On Mar 30, 2015
tnx guys
1 Reply

Qbasic Programmers SOLVE THIS QUESTIONSI'm Having A Problem With This Qbasic. Who Can Help?Can Qbasic Interact With Any DBMS ?234

Graphical Artist RequiredBest Software For Extreem Video Copyright ProtectionPope And Zuckerberg Discuss How Tech Can Solve Poverty