Write VB script to test given number is Prime Number
Answer Posted / vijay kumar
Dim n
count=0
n=inputbox("enter a number")
For i=2 to n-1
If n mod i=0 Then
count=count+1
End If
Next
If (count/2)<> 0 Then
print "given number is normal number"
else
print "given number is prime number"
End If
| Is This Answer Correct ? | 42 Yes | 14 No |
Post New Answer View All Answers
Explain runtime dynamic settings?
how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?
what is the diff between manual test plan document and automation test plan doc.can u explain indetail.
What is ObjectParamater?
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?
When should I use smart identification?
How to integrate the qualitycenter with qtp
What are the types of object repository?
Explain about the quicktest professional (qtp) automation object model?
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.
How to find Operating system information using QTP script?
how interviews will be on QTP?
How can I check if a environment variable exist or not?
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)