Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
1
0 Endorsements
Ranked #44.2K
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for SolidSora

I'm trying to write a program that prints out all prime numbers from 1 to 300. It isn't working the way I want it to. Right now it appears to have caused an infinite loop. Here is my code. [CODE]#include<iostream> #include<iomanip> using namespace std; int main(){ for(int i=0; i<=300; i++){ …

Member Avatar for Mahfuz_1
0
307
Member Avatar for baconswife

I am writing a program that outputs whether or not a number is prime. Can anyone help me find where my syntax error is? Also, i get that i = 3; i <= num; i++ would be true for it being a prime number from the other forums I have …

Member Avatar for Mahfuz_1
0
192
Member Avatar for Shinedevil

[code]#include <iostream> using namespace std; long int math; long int check; long int divider = 1; long int inputnum; void dividerp(); void counter(); void inputp(); void dividerp(){ math = inputnum/divider; if (math == 1 or inputnum == 2 or inputnum == 1){ cout<<"You do have a prime number there!"<<endl; system("PAUSE"); …

Member Avatar for Mahfuz_1
0
398
Member Avatar for boogeyman77

I'm in serious need of help with a C++ based prime number generator. I have the program to create and run the code, but i dont have the knowledge to develop the code and I'm looking for one of you guys to build the code for me. I need a …

Member Avatar for Mahfuz_1
0
630