Hi, Anybody could you Please tell me How to write the
script for Checking whether given number is Prime Number or
not..Thanks in Advance
Answer Posted / anwar basha
n=cint(inputbox("enter the number"))
if n=0 then
msgbox " invalid no"
end if
flag=0
for i=1 to n-1
if n mod i =0 then
falg=1
end if
exit for
next
if falg=1 then
msgbox "not a prime num"
else
msgbox "prime no"
end if
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
What is the main difference between function and sub-procedure?
What is event handling in vbscript?
Explain a few date functions in vbscript
Explain about the extension .hta?
How to open a file. What is the perpose of true and false mode there?
Explain about tristate constants in vbscript?
Mention when to use function procedures and what are its characteristics?
filter the array values without using filter function?
I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?
How to create a cookie using vbscript?
What is sql loader? Explain the files used by sql loader to load file?
I need to get some data from data base and store this
(retrieved) data in a excel sheet using VB script in QTP9.0
I have created connection for data base
I have created as excels sheet by using
Set XL=CreateObject("Excel.Application")
XLworksheet.cells(1,1).value= rs.fields.item("<
How to assign a date value to a variable?