1
resposta

MultiploDe3

package sitaxe_variaveis_e_fluxo;

public class MultiploDe3 {

public static void main(String[] args) {

    for (int fator = 0; fator < 100; fator++) {

        if (fator % 3 == 0) {

            System.out.print(fator + " ");
        }
        if (fator % 12 == 0 && fator != 0) {

            System.out.println();
        }
    }
}

}

Matricule-se agora e aproveite até 50% OFF

O maior desconto do ano para você evoluir com a maior escola de tecnologia

QUERO APROVEITAR
1 resposta

public class MultiploDe3 {

public static void main(String[] args){

    for (int numero =3; numero <= 100; numero++) {

        if (numero % 3 == 0) {

            System.out.println(numero);

    }

       }
   }
}