create a program to print all prime numbers between 1 to 100.
narvey ann 0 Newbie Poster
Recommended Answers
Jump to PostAre WE supposed to do that?
it is YOUR assignment, and we will gladly be helping with the code you already have and having problems with.
It all starts with knowing what a prime number is. You know that, don't you?
Jump to Post#include <iostream> int main() { std::cout << "2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97" << std::endl; }
Jump to Post#include <stdio.h> #include <cstring> char _[10000000],____[100000000], _____[10000000],__[10000000], *___; #define ________OOOOOOO________ ___,2+(((((((((((_ #define _____OOO_______OOO_____ 2+(__ #define ___OO_____________OO___ "__" #define __O____O_______O____O__ ___=_____,"") #define _O____OOO_____OOO____O_ ___,_+(_ #define O_____OOO_____OOO_____O ____,___)))for(;____ #define O______O_______O______O ___,____)?___+=(__ #define O_____________________O __,_))))?"%d\n":"" #define O____O___________O____O __,"__")),_)):(___ #define _O____OO_______OO____O_ _,"_"));fprintf(stderr #define __O_____OOOOOOO_____O__ ____,"_");for(;____ #define ___OO______________O___ ____,___);___ #define _____OOO________OO_____ __ …
All 12 Replies
ddanbe 2,724 Professional Procrastinator Featured Poster
Prashant_3 -3 Newbie Poster
iamthwee commented: -1 -3
android9000 11 Newbie Poster
iamthwee commented: -1 -3
Moschops 683 Practically a Master Poster Featured Poster
iamthwee commented: +1000000 +14
JasonHippy commented: +1! +9
AndrisP 193 Posting Pro in Training
iamthwee commented: -1 -3

iamthwee
JasonHippy commented: Seems legit! :) +9
AndrisP 193 Posting Pro in Training
android9000 11 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Slavi 94 Master Poster Featured Poster
Banfa 597 Posting Pro Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.