Saturday, December 15, 2012

3 QB problems

# Wap to print multiplication table of any number.
cls
input"any number";n
for i= 1 to 10
print n;"x";i;"="; i*n
next i
end

# Wap to print sum of natural number up to 50
cls
s=0
x=1
do while x<=50
s= s+x
x=x+1
loop
print"sum of natural numbers up to 50";s
end


# Wap to count number of vowels in given string
cls
input c$
select case c$
case "a","e","i","o","u"
print "vowel"
case else
print "constant"
end select
end

No comments: