write c++ program from 1to 100 to find prime numbers using statement.
please help me

Answer:
int count;
for (int i = 1; i <= 100; i++){
count = 0;
for (int j = 1; j <=i; j++)
if (i%j==0) count ++;
if (count == 2) cout << i << " ";
}