Zadatak8-15

#include <iostream>

using namespace std;

int main()
{
int n,i,j,br;
cin>>n;
for(i=1;i<=n;i++)
{
br=0;
for(j=1;j<=i;j++)
if(i%j==0 ) br=br+1;
if(br==2)
cout<<i<<“ “ ; }
cout<<endl;
return 0;
}

Advertisements