Computer Science, asked by saraswathi71, 2 months ago

Print all the prime numbers which are below the given number separated by comma.


Input: 50


#include"stdio.h" int main() { int n,i,j,ct=0; scanf(%d,&n); for(i=2;i<=n;i++) { ct=0; for(j=2;j<i;j++) { if(i%j==0) { ct=1; break; } } if(ct==0) { if(i>2) printf(, ); printf(%d,i); } } return 0; }​

Answers

Answered by anitatambade31
0

Answer:

can't understand the question?

Similar questions