Home Forums C Programming Welcome C++ Reply To: Welcome C++

#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.

#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;
  }
  • This reply was modified 7 years, 6 months ago by M. Saqib.
  • This reply was modified 2 years, 9 months ago by M. Saqib.