Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript
Thanks in advance
Answer Posted / hariharasudhan s
str1="1,1,2,2,3,3,4,2"
A = Split(str1,",")
For i = 0 to ubound(A)
IF A(i) = "1" then
Count1 = Count1 + 1
Elseif A(i) = "2" then
Count2 = Count2 + 1
End if
Next
Msgbox Count1
Msgbox Count2
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.
Explain calling sub procedure.
how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps
How we can use the database checkpoint on a java web based application in which the database connectivity is done using JDBC->Pure Java type (in this type there is no need to create a DSN). At present in QTP we can fetch database values using checkpoint only through DSN. Is there any programming for this if we don't have DSN (ODBC)
what is the latest version of QTP? Main difference between 9.2 and 10 version
What does mean by Scope of Automation?n How we defined it?
How to find the path of folder in which the test is saved in qtp?
Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.
What are the methods of the TextStream object that are used for reading from a text file?
How to define array in qtp?
What are the differences between table and db checkpoints?
Explain how Does Run time data (Parameterization) is handled in QTP?
How can you send user defined messages to test report?
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How to get popup error message.