Pharaoh had a dream, and this dream was interpreted by Joseph.
According to this interpretation there was to be in Egypt seven years of
plenty, followed by seven years of famine. Joseph advised Pharaoh to buy
all the surplus of the seven plentiful years and store it up against the
years of famine.
Pharaoh appointed Joseph as his minister or agent, and ordered him to
buy the grain of the plentiful years.
Then came the famine. The people came to the king for help. He told them
to go to Joseph and do as he said.
Joseph sold corn to the Egyptians until all their money was gone--until
he had it all.
When the money was gone the people said: "Give us corn and we will give
you our cattle."
Joseph let them have corn until all their cattle, their horses and their
flocks had been given to him.