Computer Science, asked by pinkigupta5269, 1 year ago

Write a program to generate prime numbers between 1 and 100 in c

Answers

Answered by handesnehal556
1

#include <stdio.h>

int main(void)

{

   for(int i=2;i<100;i++)

   {

       for(int j=2;j<i;j++)

       {

           if(i%j==0)

               break;

           else if(i==j+1)

               printf("%d\n",i);

       }

   }

}

Similar questions