answersLogoWhite

0


Best Answer

Implement an isPrime method int JAVA with this:

int count = 0, num = 2;

while(count < 50) {

if(isPrime(num)) count++;

num++;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a method which displays first 50 prime numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.


How do you write numbers from first to fifty first?

with a pencil


Why you should write 'this' keyword as a first statement in the method or any were?

no


How. to. write an. algorthim. to find the. sum of. first. 15 natural. numbers?

Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers


What is FOIL method in math?

It stands for "first, outsides, insides, last". It is how to multiply out double brackets such as (x+3)(x-4). First numbers, inside numbers, outside numbers, last numbers.


Write these numbers in order of size smallest first 2177 914 941 944 909?

write these numbers in order of size smallest first 2177 914 941 944 909


Will this site help someone attempting mathematically to write a word problem?

Someone that is attempting to write a word problem, needs to write it out in numbers first. From there, figure out what kind of products you will use, and write out sentences with numbers.


How do you write binary numbers as a decimal?

Kick yourself in the bum first


How do you write first you have to times all the consecutive numbers and your answer will be the highest factor of your answer better?

First, multiply the consecutive numbers. Your total will be the highest factor.


Make a program that displays the first four perfect numbers?

int main (void) { puts ("6 28 496 8128"); return 0; }


What are the three ways to describe a set of numbers?

The first one is roster method or listing method. The second one is verbal description method and the third one is set builder notation.


How do you write a program for Computer Programming II The Situation...Write a class for soccer game scoring. Provide a constructor that starts each team with a score of zero. Include instance...?

The Situation.. Write a class for soccer game scoring. Provide a constructor that starts each team with a score of zero. Include instance variables to keep the score for both teams. Include a method to add 1 to the score of the first team and a method to add 1 to the score of the second team. Include a method that displays the score of both teams, and the Main method to test, creating two different soccer games. Score points so the first game is 3-2 and the second game is 0-1. Display the scores of each game....can someone solve this??