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
Explain about .wsf files?
Explain a few date functions in vbscript
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz
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?
Explain How do you create a recordset object in vbscript?
What is vbscript language used for and which earlier language is it modeled upon?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
Is VB Script Case sensitive or Case insensitive?
What is sql loader? Explain the files used by sql loader to load file?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
How will you get the largest subscript of an array in vbscript?
What is the use of option explicit statement?
What are the valid scopes of a variable in vbscript?
In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?