Ocupo ayuda | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answers
+ 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