A
ashleycantino
Hi there,
I'm new to Java but my instructor doesn't seem to realize it. He
has assigned the following program and I don't even know where to
start. If someone could give me an idea of how to set this up I would
be so grateful!
Chapter 3 #9:
There's an old nursery rhyme that goes like this:
As I was going to St. Ives,
I met a man with seven wives,
Each wife had seven sacks,
Each sack had seven cats,
Each cat had seven kits:
Kits, cats, sacks, and wives,
How many were going to St. Ives?
The last line turns out to be a trick question: only the speaker is
gong to St. Ives; everyone else is presumably heading in the opposite
direction. Suppose however, that you want to find out how many reps of
the assembled multittiude were coming from St. Ives. Write a program
to calculate and display this result. Try to make your program follow
the structure of the problem so that anyone reading your program would
understand what value it is calculating.
I'm new to Java but my instructor doesn't seem to realize it. He
has assigned the following program and I don't even know where to
start. If someone could give me an idea of how to set this up I would
be so grateful!
Chapter 3 #9:
There's an old nursery rhyme that goes like this:
As I was going to St. Ives,
I met a man with seven wives,
Each wife had seven sacks,
Each sack had seven cats,
Each cat had seven kits:
Kits, cats, sacks, and wives,
How many were going to St. Ives?
The last line turns out to be a trick question: only the speaker is
gong to St. Ives; everyone else is presumably heading in the opposite
direction. Suppose however, that you want to find out how many reps of
the assembled multittiude were coming from St. Ives. Write a program
to calculate and display this result. Try to make your program follow
the structure of the problem so that anyone reading your program would
understand what value it is calculating.