Please let know the scripts for counting number of repeated
letters in the word. Note repeated letter should not be
count agian.
Ex: If "Hello" is my word... l is coming twice.. it should
count once and print... secong 'l' should not count again..
Answer Posted / mahesh.k
str=inputbox("enter a string")
ln=len(str)
nr=0
cnt=0
For i=1 to ln
If cnt>0 Then
nr=nr+1
End If
cnt=0
If strcomp(x,mid(str,i,1))<>0 Then
For j=i+1 to ln
If mid(str,i,1)=mid(str,j,1) then
cnt=cnt+1
x=mid(str,i,1)
end if
next
else
i=i+1
End If
Next
msgbox "no.of repeeted charecters="&nr
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
What are the different kinds of test steps?
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
Will down time for server and content maintenance/upgrades be allowed? how much?
What is qtpro?
Which advantages helping QTP to hold the position of "Market Leader" for such a long period?
What is the file extension of the code file and object repository file in QTP?
What are the different types of recording modes in qtp? Which will be used when?
What is 'sleep' in sync point?
Problem with XML checkpoint in QTP ?
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
Why is action split used by qtp?
How many types of run modes are there in qtp?
Hybrid framework supports Descriptive programming. Is it true?