+ 2
Write a ptogramme of prine number
prime number is divide only our number
4 Respuestas
+ 4
there can be many programs on prime number . also specify coding language but I have one for your help
https://code.sololearn.com/cbCszY15Mx8K/?ref=app
+ 1
int n = 1000;
String p = "";
for (int i = 1 ; i <= n ; i++ ) {
int ctr = 0;
for(int j = i ; j >= 1 ; j--) if ( i % j == 0 ) ctr++;
if ( ctr == 2 ) p = p+ i + " ";
}
System.out.println(p);
+ 1
Code playground has a search function.