There are 2 empty jars of 5 and 3 liters capacity. And a
river is flowing besides. I want to measure 4 liters of
wanter using these 2 jars. How do you do this?

Answer Posted / rp

First of all fill 3litre jar fullyand then pour it into
5litre jar.Now again fill 3litre jar fully and pour it into
5litre jarNow 5litre jar is full and 3litre jar has 1litre
water. Now pour all the water of 5litre jar on the ground
and pour the 3litre's jar 1 litre into 5 litre jar. Now
again fill 3litre jar fully and pour into 5litre jar .Now
5litre jar has 4litre water.
You can simply understand as:-
1)3l jar=3,5l jar=0
2)3l jar=0,5l jar=3
3)3l jar=3,5l jar=3
4)3l jar=1,5l jar=5
5)3l jar=1,5l jar=0
6)3l jar=0,5l jar=1
7)3l jar=3,5l jar=1
8)3l jar=0,5l jar=4

Is This Answer Correct ?    29 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a c++ program to display pass and fail for three student using static member function

2824


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1650


What is abstract class in oops?

606


Why is abstraction needed?

575


What does <> mean pseudocode?

632






What are functions in oop?

594


write knight tour problem which is present in datastructure

2175


What is the oops and benefits of oops programming?

562


What is overriding in oops?

614


Why multiple inheritance is not possible?

614


Can a varargs method be overloaded?

634


How do you use inheritance in unity?

595


when to use 'mutable' keyword and when to use 'const cast' in c++

1653


what are the realtime excercises in C++?

2341


Can static class have constructor?

595