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

what type of framework u r using in ur organization

1646


In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer

1934


Explain the features and benefits of quick test pro(qtp)?

512


What are the various automation frameworks available in qtp?

501


There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?

1624






What are the key points to create a framework in QTP for oracle forms?

1807


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

1739


What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1489


how to prepared for first for the first interview?

1792


How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.

1808


hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me

1871


How to build scripts that access data from external sources?

1602


what is impact analysis on regression testing?

2041


The hybrid framework can be implemented for any application. Is it true?

584


Explain xml checkpoints.

595