Question: How can i draw the flowchart related on this problem? If the input is 455231, the output should be 4231, 55, tie because 4+3+2+1 =

How can i draw the flowchart related on this problem?

If the input is 455231, the output should be 4231, 55, "tie" because 4+3+2+1 = 5+5

If the input is 53314, the output should be 3314, 5, "First one is heavier" because 3+3+1+4 is bigger than 5

If the input is 55531, the output should be 31, 555, "Second is heavier" because 5+5+5 is bigger than 3+1

Thank you

Please do not use arrays, strings or concatenation.

and what is the pre, post condition for this problem?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!