If Else (Difference between biggest and smallest) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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..

9th Mar 2019, 9:24 PM
NRG CODING
NRG CODING - avatar
4 Answers
+ 14
Hi Russ, Thank you for your information..
10th Mar 2019, 9:26 AM
NRG CODING
NRG CODING - avatar
+ 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)
10th Mar 2019, 12:02 AM
Russ
Russ - avatar
+ 11
10th Mar 2019, 9:19 PM
Sławek J.
+ 5
This is a simple C program : https://code.sololearn.com/cpNBtr18l6Qd/#c
11th Mar 2019, 11:10 AM
RainStorm
RainStorm - avatar