Sep-17-2018, 11:32 PM
(This post was last modified: Sep-17-2018, 11:37 PM by juniorcoder.)
Hello
I have three numbers and I have to find minimum of them .k=min(a,b,c) No problem.
After I need to add all the numbers until k to the another certain value
Lets say k=5 so I need to add (1 2 3 4 5)
and check
if x+1>y:
do this
if x+2>y:
do this
if x+3>y:
do this
if x+4>y:
do this
if x+5>y:
do this
How can I do that ?
Thank you so much
I have three numbers and I have to find minimum of them .k=min(a,b,c) No problem.
After I need to add all the numbers until k to the another certain value
Lets say k=5 so I need to add (1 2 3 4 5)
and check
if x+1>y:
do this
if x+2>y:
do this
if x+3>y:
do this
if x+4>y:
do this
if x+5>y:
do this
How can I do that ?
Thank you so much