Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Prime number checking
Name: Farmer John Date: April 12, 2003 at 00:59:58 Pacific OS: Win XP CPU/Ram: AMD1800/256ram
Comment:
i am tryimg to write a java program to check input no.to se if it is a prime no. I have to request a positive no. input and then loop through the formula(i=2;i*i=n;i++) n=input no.Any assistance welcome
Summary: There is no method to determine that a number is prime except by trial division. There are plenty of probabilistic methods that check compositeness and can tell you if a number is definitely not prime...
Summary: Well, there is no formula for generating prime numbers so you need to work backwards. A prime number can only be divided by itself and one. So a straitforward solution would be to run a loop from 2 to...
Summary: I am supposed to write a function in MIPS that determines if a number is prime. The function should pass the number to be judged as an argument (through $a0) and return a value to indicate whether the...