DECLARE FUNCTION countvow(s$)
CLS
INPUT "Enter testing string=";v$
PRINT "Number of vowels=";countvow(v$)
END
FUNCTION countvow(s$)
FOR i=1 TO LEN(s$)
ch$=LCASE$(MID$(s$, i, 1))
SELECT CASE ch$
CASE "a", "e", "i", "o", "u"
cnt=cnt+1
END SELECT
NEXT i
countvow=cnt
END FUNCTION
Please Help me.
ReplyDeleteWAP in qbasic to supply a sentences and count the number of consonants in the sentences.. Please help
CLS
DeleteFOR I=1 TO LEN (S$)
A$= UCASE$(MID $(S$,I,1))
SELECT CASE A$
CASE "B","C","D","F","G","H","J","K","L","M","N","P","Q","R","S","T","V","W", "X","Y","Z"
C=C+1
END SELECT
NEXT I
PRINT "NUMBER OF CONSONANTS"; C
END
cls
Deletefor i = 1 to len(a$)
b$=mid$(a$,i,1)
if b$="a" or b$="e" or b$="o" or b$="i" or b$="u" then
x=0
else
c=c+1
end if
end
There still an error in the code
DeleteWhy x=0
DeleteNot required x=0
DeleteAfter the if condition write next i
Print c
End
please solve the prigram to accept and display by changing its case e.g. kAthMANdU into KaTHmanDu
ReplyDeleteCLS
DeleteINPUT "ENTER A WORD IN RANDOM CASE";W$
FOR I = 1 TO LEN(W$)
A$ = UCASE$(MID$(W$,I,1))
B$ = LCASE$(MID$(W$,I,1))
IF MID$(W$,I,1) = A$ THEN
PRINT B$
ELSE
PRINT A$
END IF
NEXT I
END
CLS
DeleteINPUT "ENTER A WORD IN RANDOM CASE";W$
FOR I = 1 TO LEN(W$)
A$ = UCASE$(MID$(W$,I,1))
B$ = LCASE$(MID$(W$,I,1))
IF MID$(W$,I,1) = A$ THEN
PRINT B$
ELSE
PRINT A$
END IF
NEXT I
END
WAP to input a string and display the vowel characters from it in qbasic
ReplyDeleteCLS
DeleteINPUT"ENTER ANY STRING";A$
R$=LCASE$(A$)
FOR I= 1 TO LEN(A$)
T$=MID$(R$,I,1)
IF T$="A" OR T$="E" OR T$="I" OR T$="O" OR T$="U" THEN
C$=T$+R$
END IF
NEXT I
PRINT C
END
WAP TO PRINT A SENTENCE WITHOUT VOWELS
ReplyDeletehelp me please:
ReplyDeleteWAP for counting vowels and number of words existing in entered line of text
please help me how to find number of words in a sentence
ReplyDeleteDECLARE FUNCTION COUNT(S$)
DeleteCLS
INPUT"ENTER ANY STRING";S$
PRINT"NO. OF WORD IS=";COUNT(S$)
END
Wap to find frequency of VOWELS in a word in u case
ReplyDeleteSAMPLE INPUT:METEOR
SAMPLE OUTPUT:FREQUENCY OF A= 0
E= 2
I=0
O = 1
U =0
sir please solve this problem that to display the total number of character from the input given by the user without using LEN function...
ReplyDeletesir please solve this problem that to accept 54, 67, 98,12, 34,87,98,23 (like this nimber) and display the sum of this number
ReplyDeleteSir please show a program to extract all vowels and replace them with 0
ReplyDeleteplease reverse the sentence
ReplyDeletelike :- old is gold.
output should be :- gold is old.
CLS
DeleteF$ = "oldisgold"
G$ = MID$(F$, 6, 4)
H$ = MID$(F$, 4, 2)
I$ = MID$(F$, 1, 3)
n$ = n$ + G$ + H$ + I$
PRINT n$;
END
This comment has been removed by the author.
DeleteWAP in qbasic to display all the vowels preset in lower case alphabets
ReplyDeleteWrite a program to display the total number of vowels in the given words:
ReplyDeleteInformation and Generation
Plz help
Write a program to add two strings and add them
ReplyDeletePlease help me
This is to print
ReplyDelete*nepal*
**nepal**
***nepal***
****nepal****
*****nepal*****
CLS
a$ = "nepal"
b$ = "*****"
s = 5
FOR k = 1 TO 5
c$ = LEFT$(b$, k)
PRINT TAB(s); c$ + a$ + c$
s = s - 1
NEXT k
END
question
Delete*nepal*
**nepal**
***nepal***
****nepal****
*****nepal*****
Wap to input any string and count the total numbers of "R" characters in that string
ReplyDeleteCan sny one give any other idea about this program Using function
ReplyDeleteMore like this
ReplyDeletePlzzz help me qbasic: input a string and then print all the vowel letters from the string
ReplyDeleteHow to count the number of uppercase letters in a string
ReplyDeletePlz help me
ReplyDeleteWAP that accepts a word from the user and displays how many times letter 'a' is repeated in a word
Plz help....