By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,234 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,234 IT Pros & Developers. It's quick & easy.

elementary programming

P: n/a
hi all,
i need to write some really basic stuff, im just trying to figure out
different ways to do it, and i can only come up with so many.
i need to write a chart that shows from 5 cents to 1 dollar, in 5 cent
increments, how many nickels, dimes, quarters, or dollars can be made
up for that value. For example 10 cents, could be 2 nickels, or 1
dime. 30 cents could be 6 nickels or 3 dimes. 25 cents could be 5
nickels or 1 quarter. I need to make up a chart that shows this.
Using a for loop, go from 5 cents till 100 cents in 5 cent increments.
For each coin type, nickel, dime, quarter: display how many coins can
evenly go into the given amount.
align the output.

Feb 25 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* yu*****@gmail.com:
hi all,
i need to write some really basic stuff, im just trying to figure out
different ways to do it, and i can only come up with so many.
i need to write a chart that shows from 5 cents to 1 dollar, in 5 cent
increments, how many nickels, dimes, quarters, or dollars can be made
up for that value. For example 10 cents, could be 2 nickels, or 1
dime. 30 cents could be 6 nickels or 3 dimes. 25 cents could be 5
nickels or 1 quarter. I need to make up a chart that shows this.
Using a for loop, go from 5 cents till 100 cents in 5 cent increments.
For each coin type, nickel, dime, quarter: display how many coins can
evenly go into the given amount.
align the output.
Check out the FAQ item on homework questions.

Also, the FAQ item on how to post.

Hth.,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Feb 25 '07 #2

P: n/a
yu*****@gmail.com wrote:
hi all,
i need to write some really basic stuff, im just trying to figure out
different ways to do it, and i can only come up with so many.
The previous sentence reads like a lie.
i need to write a chart that shows from 5 cents to 1 dollar, in 5 cent
increments, how many nickels, dimes, quarters, or dollars can be made
up for that value. For example 10 cents, could be 2 nickels, or 1
dime. 30 cents could be 6 nickels or 3 dimes. 25 cents could be 5
nickels or 1 quarter. I need to make up a chart that shows this.
Using a for loop, go from 5 cents till 100 cents in 5 cent increments.
For each coin type, nickel, dime, quarter: display how many coins can
evenly go into the given amount.
align the output.
Prove me wrong, post one of the different ways you've found to do this
task, and I'll do my best to come up with another.

john
Feb 25 '07 #3

P: n/a
<yu*****@gmail.comwrote:
i need to write some really basic stuff, im just trying to figure out
different ways to do it, and i can only come up with so many.
Post the code for one of the ways you came up with and others will probably
chime in with different ways. If you just made that up in a fit of
enthusiasm, say so, and maybe someone will help anyway.
i need to write a chart that shows from 5 cents to 1 dollar, in 5 cent
increments, how many nickels, dimes, quarters, or dollars can be made
up for that value. For example 10 cents, could be 2 nickels, or 1
dime. 30 cents could be 6 nickels or 3 dimes. 25 cents could be 5
nickels or 1 quarter. I need to make up a chart that shows this.
Using a for loop, go from 5 cents till 100 cents in 5 cent increments.
For each coin type, nickel, dime, quarter: display how many coins can
evenly go into the given amount.
align the output.

Feb 25 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.