interview Programming and Technical Programming Arrays

Let Say, We've got 3 Kinds of Fruits such are Banana (0.5Rs), Oranges (1Rs), Apple (5Rs) and 100Rs money.
Now I would like buy 100 Fruits of all 3 kinds for 100Rs.
So, I want you to display all the possible combinations of Fruits ratios.
Find Fruits Combination (Should include all of 3 fruit types) to get 100 fruits for 100 Rs.

Read Solution (Total 2)

interview Other Question

A high school has astrange
principal .on the 1st day he has his
student perform an odd opening day
ceremony .there is 1000 locker &
1000 student in the school. The
principal asks the the 1st student to
go to every locker & open it.then he
has the 2nd student go to every 2nd
locker & close it.the 3rd student
goes to every 3rd locker & if it is
closed he opens it & if it is open
then he close it .the 4th student
goes to every 4th locker & so on
.after the process is completed with
the 1000 student how many lockers
are open
int i=5,j; j=i++ + ++i +i++; ans??