answersLogoWhite

0


Best Answer

lowerrange=1

upperrange=100

'seed the prime list to simplify program

CurrentPrimes={2}

CurrentCount=LowerRange

begin loop

while CurrentCount is Less than upperrange

if currentcount is equal to 1 or 0

'ignore these numbers because they are not relevant when working with primes

continue counting

'now check for even divisibility from within our current prime set

begin for loop

for each Prime in CurrentPrimes

if currentcount divided by CurrentPrimes has no remainder

'ignore the number as it is not prime

continue counting

end for loop

'add current count to prime set

CurrentPrimes+=CurrentCount

Increment CurrentCount

end while loop

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make pseudocode of generating prime number lay in the range of 0to100?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

write a pseudocode to accept a number and find if it is prime or not?

Yes


Develop an algorithm to display all prime numbers from 2 to 100 Give both the pseudocode version and the flowchart version Convert your pseudocode into a Java program?

Develop an algorithm to display all prime numbers from 2 to 100. Give both the pseudocode version and the flowchart version. Convert your pseudocode into a Java program.


Is it possible to find out prime number formula?

There is a proof that there is no such formula for generating all the prime numbers. Best, TSA


How do you calculate the sum of first 20 prime number?

You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.You find the first 20 prime numbers and add them together. There is no formula for generating a sequence of prime numbers and so none for the series of their sums.


Consider prime numbers between 1 and 10000. Draw a flowchart to display the prime numbers.Write a pseudo code associated with the flowchart in a)?

A) Here's an example of a flowchart and pseudocode that could be used to display the prime numbers between 1 and 10000: Flowchart:
START Set up an array of numbers from 1 to 10000 Set an empty array to store the prime numbers Set i = 2, the first prime number For each number in the array, check if it is divisible by i If it is divisible by i, it is not a prime number and move to the next number in the array If it is not divisible by i, it is a prime number and add it to the prime numbers array Increase i by 1 and go back to step 4 Repeat steps 4 through 7 until i is greater than the square root of 10000 Display the prime numbers array END


What is you called when the prime factorization of a number is 1 and itself?

You is called a prime number!You is called a prime number!You is called a prime number!You is called a prime number!


Is a factor a prime number?

A factor can or cannot be a prime number Ex: 2 is the factor of all other even numbers its a prime number but 9 is a factor of 18 and its not a prime number A prime is a factor but a factor being a prime number varies


Why 7 is not a prime number?

7 is a prime number!


What is it called when a number can only be divided by one and itself?

a prime number.


Is 167 a prime or composite number?

167 is a prime number.


Is 109 a prime number or a composite number?

109 is a prime number.


What is a prime number times a prime number?

A prime number times a prime number is a composite number. Since prime numbers, except for 2, are odd numbers, a prime number times a prime number is usually an odd number. It will only be an even number if one of the prime numbers is 2. A prime number times a prime number will be a number with four factors unless both prime numbers are the same, in which case it will be a square number with only three factors.