URI Online Judge | 1098
Sequencia IJ 4
Adaptado por Neilor Tonin, URI
Brasil
Timelimit: 1
Você deve fazer um programa que apresente a sequencia conforme o exemplo abaixo.
Entrada
Não há nenhuma entrada neste problema.
Saída
Imprima a sequencia conforme exemplo abaixo.URI Online Judge | 1098
Sequence IJ 4
Adapted by Neilor Tonin, URI
Brazil
Timelimit: 1
Make a program that prints the sequence like the following example.
Input
This problem doesn't have input.
Output
Print the sequence like the example below.
i = 0
j = 1
acrescimo = (0.2)
n = 0
while i <= 2:
for c in range(1,4):
if i > 2.19:
print('I={:.0f} J={:.0f}'.format(2,j))
if i == 1.0 or i == 0.0 or i > 1.8:
print('I={:.0f} J={:.0f}'.format(i,j))
elif i < 2:
print('I={:.1f} J={:.1f}'.format(i,j))
j = j + 1
i = i + acrescimo
j = 1 + i
i = 0
j = 1
acrescimo = (0.2)
n = 0
while i <= 2:
for c in range(1,4):
if i > 2.19:
print('I={:.0f} J={:.0f}'.format(2,j))
if i == 1.0 or i == 0.0 or i > 1.8:
print('I={:.0f} J={:.0f}'.format(i,j))
elif i < 2:
print('I={:.1f} J={:.1f}'.format(i,j))
j = j + 1
i = i + acrescimo
j = 1 + i
Nenhum comentário:
Postar um comentário