int num = 1;
int count = 0;
do{
if(num % 3 == 2 && num %5 == 3 && num % 7 == 2)
{
System.out.println(num);
count++;
}
num++;
}while(num < 1000 && count < 5);
do
do
if i mod 3 =3
if i mod 5 =3
if i mod 7 =2
pribt i
t=t+1
next
next
next
while i=1 to 1000 i++
while t<=5