Asked by rami
read the volume of three objects and sort
them in increasing order ,
then print their values ?
them in increasing order ,
then print their values ?
Answers
Answered by
MathMate
Algorithm of sorting exactly three object, a,b,c is like comparing masses of three objects on an ungraduated balance.
if a>b then
_if b>c then
__a>b>c
_else if a>c then
__a>c>b
__else
__c>a>b
else if a>c then
__b>a>c
_else if b>c then
___b>c>a
__else
___c>b>a
if a>b then
_if b>c then
__a>b>c
_else if a>c then
__a>c>b
__else
__c>a>b
else if a>c then
__b>a>c
_else if b>c then
___b>c>a
__else
___c>b>a
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.