FedericoGB25
Coder
Hello everyone
I have written a program using C Language that prints all prime numbers using a loop.
I would like to print these numbers in a Cartesian axis. I have tried to include the library graphics.h, but I can't do it because it says me "File not found".
Is there another way to do it?
My code:
Thanks a lot
I have written a program using C Language that prints all prime numbers using a loop.
I would like to print these numbers in a Cartesian axis. I have tried to include the library graphics.h, but I can't do it because it says me "File not found".
Is there another way to do it?
My code:
C:
#include <stdio.h>
int main () {
int n, d;
for(n=1;;n++) {
for(d=2;d<=n/2;d++) {
if(n%d==0) {
break;
}
}
if(n%d!=0) {
printf("* %d\n" ,n);
}
}
}
Thanks a lot