Qbasic questions
I'm a student please, help me with the following :
1) Write a Qbasic program to sort a linear array A containing N number of elements in a ascending order.
2) Write a Qbasic program to carry out multiplication of two matrices.
Web Development
I'm a student please, help me with the following :
1) Write a Qbasic program to sort a linear array A containing N number of elements in a ascending order.
2) Write a Qbasic program to carry out multiplication of two matrices.
by tech_wiz03
dim shared sort()
call load_sort(n) ' you supply method for loading array
for i1 = 0 to n-2
for i2 = i1+1 to n-1
if sort(i1)>=sort(i2) then swap sort(i1),sort(i2)
next
next
this is the basic idea behind a bubble sort
regards
rick
This discussion is closed to new replies.
Sort by Trending