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 ?    41 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

555


What is RTM (require ment tracebulity marix) fromate?

1519


In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?

1498


Hoe can we do retesting using functions please give the code for it using login page

1553


I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!

1430






Can U Explain about QTP tool from older version to latest version also its differences?

1508


How does quicktest professional identifies the object in the application?

541


How is test case write?

570


Explain quicktest professional testing process?

556


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

1598


Explain the use of action split in qtp?

553


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.?

596


Your roles and responsibilities and daily tasks? (As automation tester)

2574


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1411


tell me QTP standards ?plz

1508