• Предмет: Информатика
  • Автор: patrick2259
  • Вопрос задан 2 года назад

A program that takes two inputs and subtracts the second from the first. If the result is negative, the program should subtract the first input from the second. LMC!!!
Что надо делать? What's it?​

Ответы

Ответ дал: itskiriz
0

Ответ:

Ам. Хз на каком языке тебе это написать, но я напишу на питоне.

Объяснение:

def subtract(first, second):

if(first - second < 0) return second - first

else:

return first - second

first = input ("Введи первое число, пожалуйста ")

second = input ("Введи второе число, пожалуйста ")

print("\n")

print( subtract (first, second ) )

Вас заинтересует