Search found 5 matches

by Jonathon
Sat May 01, 2004 6:02 pm
Forum: QBasic / QuickBasic related
Topic: Sorting Problem
Replies: 3
Views: 1597

Re: Sorting Problem

I did that and have to trouble with the first set sorting and printing, but the second variable doesnt follow. How can I get it to follow through the sorting with the first?
by Jonathon
Wed Apr 28, 2004 6:24 pm
Forum: QBasic / QuickBasic related
Topic: Sorting Problem
Replies: 3
Views: 1597

Re: Sorting Problem

hey, thanks a lot. That really helped.
by Jonathon
Sun Apr 25, 2004 7:38 pm
Forum: QBasic / QuickBasic related
Topic: Sorting Problem
Replies: 3
Views: 1597

Sorting Problem

I am stuck on a sort problem. I am not able to get them to sort in acending order correctly. Unfortunetly I cannot use a swap command in my problem.

So far I have:

Dim number$(20)
Dim class$(20)
for t = 1 to 4
Read number$(t), class$(t)
next t

for x = 1 to 15
      if number$(x ...
by Jonathon
Tue Mar 16, 2004 5:33 pm
Forum: QBasic / QuickBasic related
Topic: trouble with sort
Replies: 7
Views: 2167

Re: trouble with sort

thanks a lot for the help. :)
by Jonathon
Tue Mar 16, 2004 3:49 am
Forum: QBasic / QuickBasic related
Topic: trouble with sort
Replies: 7
Views: 2167

trouble with sort

I am having trouble with a sort function that I was working on. I am just starting out with qbasic. Any help would be great.


CLS
a(1) = 6
a(2) = 10
a(3) = 25
a(4) = 5
a(5) = 3

FOR t = 1 TO 5
IF a(t) > a(t + 1) THEN
temp = a(t)
a(t) = a(t + 1)
a(t + 1) = temp
END IF
NEXT t