Fixed program 2 to sort multiple vectors not only 1
This commit is contained in:
parent
ac11f56278
commit
e2eb9dfa6c
2 changed files with 19 additions and 5 deletions
|
|
@ -34,9 +34,16 @@ subroutine sort
|
|||
end do
|
||||
end do
|
||||
end subroutine
|
||||
readDim()
|
||||
readVec()
|
||||
sort()
|
||||
print 'Sorted vector: '
|
||||
printVec()
|
||||
do then
|
||||
readDim()
|
||||
readVec()
|
||||
sort()
|
||||
print 'Sorted vector: '
|
||||
printVec()
|
||||
print 'Do you want to sort another vector? enter 1 for yes and 0 for no', endline
|
||||
read temp
|
||||
if (temp == 0) then
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
end program
|
||||
|
|
@ -72,3 +72,10 @@ call 2
|
|||
call 40
|
||||
print 'Sorted vector: '
|
||||
call 16
|
||||
print 'Do you want to sort another vector? enter 1 for yes and 0 for no'
|
||||
print endline
|
||||
read $213
|
||||
== $213 0 $11
|
||||
gotoF $11 81
|
||||
goto 82
|
||||
goto 70
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue