--

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream> 
using namespace std; 
int main () 
{
    int tempNum = 100, i, j;
    for ( i=3; i<=tempNum; i++) 
    {
        for ( j=2; j*j<=i; j++)
        {
            if (i % j == 0) 
                goto L1;
            /* else if (j+1 > sqrt(i)) {
                cout << i << " "; 
            } */
        }   
        cout << i << " ";
        L1: ;
    }
    return 0;
}