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 / anant
boolean isPrime(int num){
if(num==0 || num==1){
System.out.println("Number should be greater than 1");
System.Exit(0);
}
if(num%2==0 || num%3==0 || num%5==0 || num%7==0)
System.out.println("Number is not prime");
else
System.out.println("Number is prime");
}
| Is This Answer Correct ? | 2 Yes | 14 No |
Post New Answer View All Answers
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
who will create the object?
Write a Script for ATM in QTP
Can u describe what kind of testing are for OTC derivates by banks.
What are the disadvantages of vbscript?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
How to open excel in vb script?
What methods are used to create text files and open text files in the vbscript language?
i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click
What is the use of the date function in the vbscript language?
Both Static and dynamic arrays are handled by VB script. Is it true?
can anyone tell me the procedure of interview held in applabs
Explain about .wsf files?
How to write VB script for login module?
How will you convert a string to upper case string using vbscript?