+ 2

Write a ptogramme of prine number

prime number is divide only our number

12th Sep 2017, 6:06 AM
Shashank Dubey
4 Respostas
+ 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
12th Sep 2017, 6:40 AM
HASHIR IMAM
HASHIR IMAM - avatar
+ 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);
12th Sep 2017, 6:45 AM
Mikhael Anthony
Mikhael Anthony - avatar
+ 1
Code playground has a search function.
12th Sep 2017, 6:59 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar