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
What are the differences between quicktest professional and winrunner?
How to run a test using quicktest professional (qtp)?
How do you delete unwanted results in qtp?
could any help me please, how to work on visual foxpro application using UFT
How to connect to a database?
www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example
Problem with XML checkpoint in QTP ?
How can i check items sorted or not in a weblist ? Give me the script for this...
What is the use of ordinal identifier in qtp?
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.
How to use setroproperty?
What is qtpro? What is a quick test professional?
What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?
How you will rate urself in QTP in the range of 0 to 5
I want to do QTP Certification what is the pattern of Question paper.