+ 20
If Else (Difference between biggest and smallest)
Hi, Please would you help me to write IF ELSE formula like "There will be 3 different positive numbers, programm will show us difference between larger and smallest number." Thanks..
4 odpowiedzi
+ 14
Hi Russ,
Thank you for your information..
+ 12
if a >= b and a >= c:
if b >= c:
print(a-c)
else:
print(a-b)
elif b >= a and b >= c:
if a >= c:
print(b-c)
else:
print(b-a)
else:
if a >= b:
print(c-b)
else:
print(c-a)
+ 11
Here is c++ code with sorting
https://code.sololearn.com/cPCw2EbR1NxU/?ref=app
+ 5
This is a simple C program : https://code.sololearn.com/cpNBtr18l6Qd/#c