0
1 dan 100 gacha bo‘lgan sonlar orasidan tub sonlarni chiqaruvchi dastur tuzing
Masalan
3 Respuestas
+ 1
Sirius Black:
Shirinoy Muhsinjonova:
class Misol {
public static void main(String[] args) {
int i;
int a;
int s;
for (i=1; i<=100; i++)
{s=0;
for(a=1; a<=i; a++){
if(i%a==0)
s++;
}
if(s==2) ;
System.out.println(i);
}
}
}
is it true?
0
Yeah, it's true. But it requires much more resources. So, you can and must optimize it.