Connect Me

twitterfacebookgoogle plus email

  Instagram View Biwas Bhattarai's profile on LinkedIn
Showing posts with label reverse string in qbasic. Show all posts
Showing posts with label reverse string in qbasic. Show all posts

Reverse the word using QBASIC program


Qbasic Program to Reverse a string(word)
cls
b$="BIWAS"
c=LEN(b$)
for i= 1 to c
a$=mid$(b$,i,1)
r$=a$+r$
next i
print "Reverse"; "of"; b$; "is"; r$
end

OR


b$="BIWAS"
c=LEN(b$)
for i= c to 1 step -1
a$=mid$(b$,i,1)
r$=r$+a$
next i
print "Reverse"; "of"; b$; "is"; r$
end


Ą
https://www.flickr.com/photos/spklg/15211044551/