how to find number of characters(letter a) in
the sentence
Rain Rain Go away
Answer Posted / megha gupta
Dim Str, p,temp,i,l
i=0
Str= inputbox("Enter the string","User input 1")
p= inputbox("Enter the character you want to search in
specified string", "User Input 2")
l= Len(str)
Do while l>0
temp= left(str,1)
str= Right(str,l)
l=l-1
If (temp=p) Then
i=i+1
End If
Loop
Msgbox "Number of times "& p &" character in string is : "&
i &""
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to open excel in vb script?
How to create a function in vbscript?
What are class events?
Explain about vb script?
What is the output of a + b in vbscript if a = 5 and b = 10?
Both Static and dynamic arrays are handled by VB script. Is it true?
What are class variables?
What are the rules to name variable in vbscript?
What is the technology used by vb script?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
How to declare an array in vbscript?
Explain about the support of asp for vb script functionality?
What is Procedure or Subroutine in VB Script?
Write a Script for ATM in QTP
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.