Search found 5 matches
- Sat May 01, 2004 6:02 pm
- Forum: QBasic / QuickBasic related
- Topic: Sorting Problem
- Replies: 3
- Views: 895
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?
- Wed Apr 28, 2004 6:24 pm
- Forum: QBasic / QuickBasic related
- Topic: Sorting Problem
- Replies: 3
- Views: 895
Re: Sorting Problem
hey, thanks a lot. That really helped.
- Sun Apr 25, 2004 7:38 pm
- Forum: QBasic / QuickBasic related
- Topic: Sorting Problem
- Replies: 3
- Views: 895
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) > num...
- Tue Mar 16, 2004 5:33 pm
- Forum: QBasic / QuickBasic related
- Topic: trouble with sort
- Replies: 7
- Views: 1221
Re: trouble with sort
thanks a lot for the help.
- Tue Mar 16, 2004 3:49 am
- Forum: QBasic / QuickBasic related
- Topic: trouble with sort
- Replies: 7
- Views: 1221
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
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