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 / sonia

fill 5 liters jar and pour in 3 liters------ now you have 3 in 3 liters and 2 in 5 liters.
pour away the 3 in 3 liters jar and transfer the 2 in the now empty 3 liters.
Fill 5 liters jar again and pour in 3 liters jar----- Now you have 1 from 5 liters and 2 that were in 3 liters jar already. this gives you 4 in the 5 liters jar.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is persistence in oop?

745


What is difference between data abstraction and encapsulation?

704


How do you explain polymorphism?

683


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1746


What are the 3 principles of oop?

714






What makes a language oop?

700


What is encapsulation in oops?

627


Which language is pure oop?

636


What is the use of oops?

692


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1723


Why is abstraction used?

713


can inline function declare in private part of class?

3786


What is overloading and its types?

703


what is different between oops and c++

2077


What is a class in oop?

676