Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
prime-numbers
- Page 1
Prime Numbers
Programming
Software Development
17 Years Ago
by zclevenger
… solutions, we will give extra points! Problem 2: How many
prime
numbers
are there? (8 Points) Write a Python program that asks…the user for a number n and then writes all
prime
numbers
less than or equal to n into a file … Please enter a number greater than 2: 50 Found 15
prime
numbers
; please check file primes-50.txt For this example, the…
prime numbers
Programming
Software Development
20 Years Ago
by cblue
…know how to find
prime
numbers
of several
numbers
, does anyone know hoew to find a
prime
sumber of a single …limit) { if (n % divisor == 0) // n is divisible, not
prime
{ return false; } divisor += 2; // check next odd number } …
Prime Numbers Help?
Programming
Software Development
16 Years Ago
by timb89
… that will read in a set of
numbers
and determine whether or not they are
prime
numbers
, this is what i got so…; input; queue <int>
prime
; int inputNum; int temp; cout << "Type the
numbers
, ending with 0: " <…
Prime numbers help
Programming
Software Development
14 Years Ago
by cufisa
…having is showing at the end how many
prime
numbers
there are for the two
numbers
, calculating the average and lastly asking the…++ printf( "\nThere are %d
Prime
numbers
.\n", primecount ); printf( "The average of the
prime
numbers
is %.2f\n", average ); …
Prime numbers
Programming
Software Development
16 Years Ago
by myle
… a function which calculates the first n primes.
prime
computes some
prime
numbers
and keeps them in a list. Then tries… it's not even divisible by the already discovered
numbers
then adds it in the list. But unfortunately, …math import sqrt from math import floor def
prime
(n): primes = [] # how many
prime
number have been discovered i = 3 #…
Re: Prime Numbers Help?
Programming
Software Development
16 Years Ago
by timb89
…;< "The
prime
numbers
are: " << endl; while(!
prime
.empty()) { cout <<
prime
.front() << endl;
prime
.pop(); } system ("…
Re: Prime numbers help
Programming
Software Development
14 Years Ago
by cufisa
…; %d ",i); c++; } if (c==0) printf("
Prime
"); x++; } return 0; } [/CODE] rootybrain - Well I …fine by telling the user if the
numbers
between x and y are
prime
and their factor. The real problem… I am having trouble finding the average of the
prime
numbers
between the two integers which I know how to …
prime numbers
Programming
Software Development
20 Years Ago
by quasimof
i wrote this program to find
prime
numbers
, but whenever i run it, i get an error. This … a number greater than 2, and then print out what
prime
numbers
added together would make up the number the user inputed…;<endl; } //my first step is to determine what 2
prime
numbers
would add up to get the //number the user inputs…
Re: Prime numbers help
Programming
Software Development
14 Years Ago
by WaltP
…++ printf( "\nThere are %d
Prime
numbers
.\n", primecount ); printf( "The average of the
prime
numbers
is %.2f\n", average ); printf…
Prime Numbers
Programming
Software Development
15 Years Ago
by Hitman Mania
CAn someone give the C code for this? thanks :) : A
prime
number is an integer, greater than 1, that is only …. 3, 11, and 43 are examples of
prime
numbers
. Twin primes are a pair of
prime
numbers
which differ by 2. For example, 3…
Prime Numbers
Programming
Software Development
14 Years Ago
by burntout
… on an app that takes two
numbers
(lower bound and upperbound)and determines all the
prime
numbers
within the specific bounds, inclusive. [code….Error) End If 'declare an array that will store the
prime
numbers
gotten For i = LowerBound To UpperBound If IsPrime(N) = True…
Re: prime numbers
Programming
Software Development
16 Years Ago
by FlamingClaw
…?If more or less as 2 then Not
prime
else if exactly 2 then
prime
...(only 1 and itself) Like in pascal… snippets I wrote a little program that writes the
prime
and not
prime
numbers
from 0 to 100.The method is that I… count the divisors'
numbers
.... Sorry I'm just knowing the pascal…
Re: prime numbers
Programming
Software Development
16 Years Ago
by rahul8590
…?If more or less as 2 then Not
prime
else if exactly 2 then
prime
...(only 1 and itself) Like in pascal… snippets I wrote a little program that writes the
prime
and not
prime
numbers
from 0 to 100.The method is that I… count the divisors'
numbers
.... Sorry I'm just knowing the pascal…
Re: prime numbers
Programming
Software Development
15 Years Ago
by akaban
… for incomplete description actually i need a program to print
prime
numbers
from 1 to 100 i am working in vb6. and… made a program which is creating all of the non-
prime
numbers
from 1 to 100 but i am unable to compare… it... and generate
prime
numbers
... this is the program [CODE]Private Sub Command1_Click() Dim o…
Re: prime numbers
Programming
Software Development
16 Years Ago
by hiraksarkardg
…a.add(i); } } System.out.println( " the list of
prime
nos are " + a); For better run time requirement I…are " + a); See, all we know that
prime
numbers
are odd except 2. So why should we go for… checking even
numbers
? That's why I write for( int j = 2 …
Re: prime numbers
Programming
Software Development
11 Years Ago
by Banfa
…of a high order. > since 1 is
prime
Actually most university level matamaticians no longer think of …1 as
prime
, it is just a (very) special case. … independantly initially then you can skip testing all the other
prime
numbers
(including ddanbe's suggested optimisation) if ((number % 2) …
Re: prime numbers
Programming
Software Development
11 Years Ago
by rubberman
Ah,
prime
numbers
! One of my favorite subjects when I was studying public …-1985. I wrote some interesting
prime
factorization algorithms that were quite efficient so I could generate Goedel
numbers
from random strings, and… extract the strings from the
numbers
in turn. Over the years, other stuff caught my interest, …
Prime Numbers
Programming
Software Development
19 Years Ago
by RITZY_G
:cry: i'm so confused right now, can any one help with this? defining a functoin bool
prime
(int n) which prints 10000
prime
numbers
Re: Prime Numbers
Programming
Software Development
19 Years Ago
by jwenting
… favourite search engine. wikipedia also has an excellent article on
prime
numbers
complete with explanations of the most popular algorithms. None are…
prime numbers
Programming
Software Development
16 Years Ago
by becdudek
… meant to write a method to display a number of
prime
numbers
specified by the user. here's my code and i…
Prime Numbers
Programming
Software Development
18 Years Ago
by Lardmeister
… all sorts of small study programs, like this one, calculating
prime
numbers
and displaying them in a convenient scrolling listbox.
Prime numbers help
Programming
Software Development
15 Years Ago
by Hitman Mania
… I'm trying to make a program that generates twin
prime
numbers
between 1 and 1000. I think I got it, but…
prime numbers
Programming
Software Development
15 Years Ago
by akaban
hello i am trying to make a program for
prime
numbers
but facing some problem can any one can help me in making this program
prime numbers
Programming
Software Development
15 Years Ago
by harika.jo
how to display
prime
numbers
in java>
Re: prime numbers
Programming
Software Development
15 Years Ago
by vchandra
follow these steps: 1. let say you need to findout all the primes till number n 2. create a outer for loop which will iterate from 1 to n (let say int i) 3. create a inner for loop(int j) and chk i%j 4. for
prime
numbers
i%j will be 0
prime numbers
Programming
Software Development
12 Years Ago
by sadiq.pardesi
hello friends plz tell me how i print the
prime
numbers
from 1-1000 in for loop in c++. plz help me
prime numbers
Programming
Software Development
11 Years Ago
by narvey ann
create a program to print all
prime
numbers
between 1 to 100.
Re: Prime numbers in range.
Programming
Software Development
12 Years Ago
by RainbowMatrix
… n
prime
numbers
5. C program to find n
prime
numbers
#include…
prime
numbers
in c programming 2. Display
prime
numbers
in c 3. C program to find
prime
numbers
between two
numbers
4. C code to display
prime
numbers
…sum + num; } printf("Sum of
prime
numbers
is: %d ",sum); return 0…
Prime Numbers Test n/2 vs. sqrt(n)
Programming
Software Development
17 Years Ago
by Moporho
… main() { int count = 0; cout << "The
prime
numbers
from 2 to 10000 are:\n"; for (int x…;\nThere were " << count << "
prime
numbers
tested\n" << endl; return 0; } bool… main() { int count = 0; cout << "The
prime
numbers
from 2 to 10000 are:\n"; for (int x…
prime numbers and multiples(threads)
Programming
Software Development
14 Years Ago
by HardWorkingMan
I have a assignmnt to find all
prime
numbers
less then 100 ,using a boolean … last bit. the final step is showing all 26
prime
numbers
again. Need help!! [CODE] package chapter_5; public …fill(array, true); // sets
numbers
not
prime
to false and shows
prime
numbers
System.out.println("
Prime
numbers
less than " + …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
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
© 2025 DaniWeb® LLC