Write VB script to test given number is Prime Number

Answer Posted / apoorva

bresult = False
Num = 907
For i = 2 To Num / 2
If Num Mod i = 0 Then
bresult = True
Exit For
End If

Next
If bresult = True Then
MsgBox "Prime"
Else
MsgBox "Not Prime"
End If

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you send user defined messages to test report?

577


What is recovery scenario in qtp?

577


What are the different types of recording modes in qtp? Which will be used when?

555


Without using gui map editor we can recognize the application in winrunner ?

599


What is the difference between a Function and Action in QTP?

581






what is the diffrence bw qtp architectute and qtp framework?

1533


I want to do QTP Certification what is the pattern of Question paper.

1737


How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

1662


What is throw object?

1737


Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.

1513


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com

1488


please post the interview questions for QA position in FACTSET

3940


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

911


what is run action?

1430


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1453