¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Either java or c++
How to create a program that will: Enter a number to execute 5: Output: 1 10 11 20 21 2 9 12 19 22 3 8 13 18 23 4 7 14 17 24 5 6 15 16 25 DO YOU WANT TO CONTINUE <Y/N>: N Thank You for Visiting my program.
2 Respuestas
0
Java: two for() cycles. Values are depending on number of cycle iterations. Scanner in the end. That's how I see it.
0
print i 11-i 10+i 21-i 20+i
or
print i a=11-i b=10+i a+10 b+10
or
i=1, a=10, b=11, c=20, d=21
print i++ a-- b++ c-- d++
or ...