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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is TOM in QTP?
How is test case write?
How many tabs are available to view your test in a test pane and what are they?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
How software automation specialist enter steps in the Expert View?
How many number of actions possible in qtp?
What is a data driven test in qtp?
we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?
Why we load add-ins in qtp?
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........
1.How do u prepare the test suits in QC? 2.How do u convert requirements to test plan in QC?
Does Low-level recording capture mouse movements?
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?