Home › Forums › C Programming › Welcome C++ › Reply To: Welcome C++
October 3, 2006 at 10:18 am
#3200
bankkung
Participant
Hello my community,
I am new to this forum & want to solve a project question.Ave tried my best but it is not executing, shows 8 errors. I am trying to find the prime numbers between 1 -7000.The sub intervals that holds themost prime numbers and printing a histogram.
C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include<stdio.h> #include<conio.h> void main() { int num = 0; prime_num(num); } { for(int i=0;i<=7000;i++) { for(int j=2; j <= 7000;j++) { if( i != j && 1 != j) { return 0; break; } if(num%1 == num) { if (isprime) { printf("Prime:", i); } return 1; } |