Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int i = 0;
- int x = 0;
- for (int x=1; x<30; x++) {
- for (i=2; i<x-1; i++) {
- if (x%i==0) {
- break;
- }
- else {
- printf("%d ", x);
- break;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement