Niente non restituisce nulla questo è il programma:
int k = 2;
             
             for ( k =2; k <= 10; k++) {
             if ( k % 2 == 0)
             k++;
             else
             cout << k <<"\n"; 
             }
Poi ne ho fatto un altro:
int n = 2;
int y = (int)sqrt(n);
int k = n % y;
int x;
                    while ( y <= 10)
                    {
                     x = n / y;
                     if ( k == 0)
                     n++;
                     else
                     cout << n <<"\n";
                     }
Quest'ultimo nemmeno restituisce nulla, forse non ho ben capito come funziona il while, for, if else.,
perchè sennò non si spiega ...
Grazie delle eventuali risposte.