Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- int[] naoDivisiveisPor5 = new int[99];
- int indice = 0;
- for (int contador = 1; contador < 100; contador++) {
- if (contador % 5 == 0) {
- continue;
- }
- naoDivisiveisPor5[indice] = contador;
- indice++;
- }
- int[] naoDivisiveisOrganizado = new int[indice];
- for (int i = 0; i < indice; i++) {
- System.out.print(naoDivisiveisPor5[i] + " ");
- naoDivisiveisOrganizado[i] = naoDivisiveisPor5[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement