ronald montaño

Generation

generate functionSun, 09 Jul 2023

Genere número primos

public class Primes { public static void main(String[] args) { for (int i = 2; i < 100; i++) { boolean isPrimeNumber = true; for (int j = 2; j < i; j++) { if (i % j == 0) { isPrimeNumber = false; break; } } if (isPrimeNumber) { System.out.print(i + " "); } } } }

Want to kickstart your project?Use the new AI Studio to create your code