Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 97 results for
primenumbers
- Page 1
PrimeNumbers.java
Programming
Software Development
15 Years Ago
by code_warrior
[I][COLOR="Red"]This code enables the user to enter a number and finds the prime from 2 to the entered number..Please name it
PrimeNumbers
.java Hope it'll help u..[/COLOR][/I]:D
Calculating PrimeNumbers
Programming
Software Development
14 Years Ago
by Skeen
… (buffer[i]) { count++; } } printf("\n...Calculation done :)\n %d
Primenumbers
found in %1.3f seconds!\n", count, (clock()-Time…; "Calculation done! " << Counter << "
Primenumbers
in " << TimeElapsed << " seconds!"…
Finding large (2,000,000th) prime.
Programming
Software Development
13 Years Ago
by nwhitesel
…{
primeNumbers
[i] = true; } // BitArray
primeNumbers
= new BitArray(limit, true);
primeNumbers
[0] = false;
primeNumbers
[1…; i < limit; i++) { if (
primeNumbers
[i] == true) { primeList.Add(i); …
Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by CompSci_Guy
… = regularNumbers.dequeue(); if(firstNumber != null){
primeNumbers
.enqueue(firstNumber); //while(regularNumbers.peek() != null…secondNumber % firstNumber != 0){ tempQueue.enqueue(secondNumber); } } //
primeNumbers
= regularNumbers; regularNumbers = tempQueue; } } while(firstNumber <…
Re: Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by haranaboy
…;// = new LinkedQueue<Integer>(); private Queue<Integer>
primeNumbers
;// = new LinkedQueue<Integer>(); public Sieve(){ Queue<Integer… LinkedQueue<Integer>(); Queue<Integer>
primeNumbers
= new LinkedQueue<Integer>(); //
primeNumbers
= null; //regularNumbers = null; }[/CODE] your declaring the…
Re: Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by haranaboy
…;// = new LinkedQueue<Integer>(); private Queue<Integer>
primeNumbers
;// = new LinkedQueue<Integer>(); public Sieve(){ Queue<Integer… LinkedQueue<Integer>(); Queue<Integer>
primeNumbers
= new LinkedQueue<Integer>(); //
primeNumbers
= null; //regularNumbers = null; }[/CODE] your declaring the…
Re: Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by haranaboy
…same line.*/ output += String.format("%s ",
primeNumbers
.dequeue()); //output = output +primeNumber.dequeue(); } else{… output += String.format("%s \n",
primeNumbers
.dequeue()); counter = 0; //reset counter to 0…
Re: Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by CompSci_Guy
…;// = new LinkedQueue<Integer>(); //private Queue<Integer>
primeNumbers
;// = new LinkedQueue<Integer>(); private boolean hasResults = false; private… = new LinkedQueue<Integer>(); private Queue<Integer>
primeNumbers
= new LinkedQueue<Integer>(); [/CODE]
Re: Beginning Java, Working with Queues.. few questions
Programming
Software Development
13 Years Ago
by haranaboy
… method "reportResults()", if you print the variable "
PrimeNumbers
" it outputs this. "front [some values stored in… either manipulate the string output or you can go [CODE]
PrimeNumbers
.dequeue() // to remove the FIRST on the list.[/CODE] I…
C++ Practice Problem Help
Programming
Software Development
10 Years Ago
by kal_crazy
… Aniseed ) (Intermediate) #include <iostream> using namespace std; void
PrimeNumbers
(int n, int count); int main(){ int n = 0; int…
Errors writing to file
Programming
Software Development
15 Years Ago
by warjas816
… the file. PrintWriter outputFile = new PrintWriter(
PrimeNumbers
.txt); //Write number to the file. outputFile.println(
PrimeNumbers
.txt); //Close the file. outputFile.close…
Problem with methods and writing to file
Programming
Software Development
15 Years Ago
by ebebcb
…the file. PrintWriter outputFile = new PrintWriter("
PrimeNumbers
.txt"); while (number <=100 … number to the file. outputFile.println("
PrimeNumbers
.txt"); //Close the file. outputFile.…
Optimizing a program
Programming
Software Development
13 Years Ago
by angraca
I am new to python and this is my first program. The program factorize a number given by a user. It also makes a list of all the
primenumbers
, that it finds and stores them in a file. Is there anybody who can see a way that I can make this program faster. Remember it is important that I still have a list with
primenumbers
. All help is apriciated
Re: Optimizing a program
Programming
Software Development
13 Years Ago
by TrustyTony
…(userinput**0.5) # Opens a list with all earlier found
primenumbers
i = plist[-1] # Checks if sqrroot of userinput is bigger… than the last element in plist (list with all stored
primenumbers
) if rootinput > i: i = i + 2 # If rootinput >…
Re: Optimizing a program
Programming
Software Development
13 Years Ago
by vegaseat
… a user. It also makes a list of all the
primenumbers
, that it finds and stores them in a file. Is… it is important that I still have a list with
primenumbers
. All help is apriciated[/QUOTE]Well, if you simply want…
Re: Optimizing a program
Programming
Software Development
13 Years Ago
by TrustyTony
…('Wrong number') continue # Opens a list with all earlier found
primenumbers
factor = [] # while x is smaller than plist elements - check if…
Average of prime number between 1 & 100
Programming
Software Development
17 Years Ago
by mindfrost82
… I'm doing wrong. Thanks. [code] using System; public class
PrimeNumbers
{ // Main method entry point public static void Main() { // declare variables…
Re: Average of prime number between 1 & 100
Programming
Software Development
17 Years Ago
by mindfrost82
[CODE] using System; public class
PrimeNumbers
{ // Main method entry point public static void Main() { // declare variables …
Questions about a program I have written
Programming
Software Development
16 Years Ago
by Questions???
… of the prime numbers from 1 to 100.*/ public class
PrimeNumbers
{ /* Main method entry point*/ public static void Main() { /*declare variables…
So close yet so far away from prime
Programming
Software Development
14 Years Ago
by plato_03
… this code to make sure that it ONLY outputs the
primenumbers
, and so that it continues the loop afterwards so that…
Re: So close yet so far away from prime
Programming
Software Development
14 Years Ago
by VernonDozier
… this code to make sure that it ONLY outputs the
primenumbers
, and so that it continues the loop afterwards so that…
RSA Encryption, S.O.S. Emergency Distress Signal
Programming
Software Development
14 Years Ago
by sofiastrange
… into english. [code] // FinalProject. // RSA ENCRYTION REQUIREMENTS // 'p' and 'q'
Primenumbers
. n= p*q // 'e' encryption key 'd' decryption key. [n…
C# for beginner
Programming
Software Development
14 Years Ago
by reyarita
1. (
PrimeNumbers
) An integer is said to be prime if it is …
Print prime numbers 8 in a row?
Programming
Software Development
12 Years Ago
by webdragon89
… numbers <200. [CODE]import java.util.Scanner; public class
PrimeNumbers
{ public static void main(String[] args) { Scanner input = new Scanner…
Re: Print prime numbers 8 in a row?
Programming
Software Development
12 Years Ago
by webdragon89
[CODE]import java.util.Scanner; public class
PrimeNumbers
{ public static void main(String[] args) { Scanner input = new Scanner( …
Re: Print prime numbers 8 in a row?
Programming
Software Development
12 Years Ago
by webdragon89
[CODE]import java.util.Scanner; public class
PrimeNumbers
{ public static void main(String[] args) { Scanner input = new Scanner( …
Re: Print prime numbers 8 in a row?
Programming
Software Development
12 Years Ago
by webdragon89
… call println()?[/QUOTE] [CODE]import java.util.Scanner; public class
PrimeNumbers
{ public static void main(String[] args) { Scanner input = new Scanner…
Re: Print prime numbers 8 in a row?
Programming
Software Development
12 Years Ago
by hiddepolen
… do with it: [CODE] import java.util.Scanner; public class
PrimeNumbers
{ public static void main(String[] args) { Scanner input = new Scanner…
understanding euler totient function
Programming
Software Development
11 Years Ago
by nitin1
….topcoder.com/tc?module=Static&d1=tutorials&d2=
primeNumbers
and the para which is just before the euler totient…
How to find the nth prime number (where n is the User input) c++
Programming
6 Years Ago
by ViperVenomHD
… main(){ unsigned int UI; // userinput int counter1 = 1; // number of
primenumbers
bool isprime = true; int primenumber = 3; //number that it is…
1
2
3
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC