Ответ:
arr = []
def test():
a = int(input())
arr.append(a)
if len(arr) < 3:
test()
arr2 = []
for i in arr:
if i < 0:
arr2.append(i ** 2)
else:
arr2.append(i ** 3)
print("\n")
for i in arr2:
print(i)
Решение представлено во вложении.
Язык: Pascal
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
arr = []
def test():
a = int(input())
arr.append(a)
if len(arr) < 3:
test()
test()
arr2 = []
for i in arr:
if i < 0:
arr2.append(i ** 2)
else:
arr2.append(i ** 3)
print("\n")
for i in arr2:
print(i)
Решение представлено во вложении.
Язык: Pascal