Ocupo ayuda | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Ocupo ayuda

necesito su ayuda debo Escribir un cĆ³digo que visualice la siguiente salida con for: 1 12 123 1234 123 12 1

21st Oct 2018, 5:54 AM
hehwhs hsjavqbdvqha
hehwhs hsjavqbdvqha - avatar
5 Respostas
+ 2
22nd Oct 2018, 3:54 AM
John Wells
John Wells - avatar
+ 2
Normalmente no escribimos programas para personas. Si lo escribes y estĆ” roto, lo arreglaremos. Sugerencia: dos bucles primero contando las lĆ­neas de salida y segundo nĆŗmero de recuento interno a la salida.
22nd Oct 2018, 2:50 AM
John Wells
John Wells - avatar
+ 1
muchĆ­simas gracias amigo!
22nd Oct 2018, 4:14 AM
hehwhs hsjavqbdvqha
hehwhs hsjavqbdvqha - avatar
0
class programa9{ public static void main(String[] args) { int num=1; int cont=1; int i=num; for(num=1;num<=4;num++){ for(i=num;i>=num-cont+1;i--){ System.out.print(i+" "); } System.out.println(""); } } }
22nd Oct 2018, 3:38 AM
hehwhs hsjavqbdvqha
hehwhs hsjavqbdvqha - avatar
0
ahora me puedes ayudar John Wells?
22nd Oct 2018, 3:39 AM
hehwhs hsjavqbdvqha
hehwhs hsjavqbdvqha - avatar