Answer the question
In order to leave comments, you need to log in
Why is the number not reversed?
Please tell me why the second part of the task is not executed? what am i doing wrong?
Task: Given three variables of real type A B C. If their values are sorted in ascending or descending order, then double them. Otherwise, replace the value of each variable with the opposite, display the resulting values.
Here is what I have
Answer the question
In order to leave comments, you need to log in
change the value of each variable to the opposite
A = -A;
, no conditions needed.A *= 2;
is what you have written - this is squaring.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question