# elementary programming

Y

#### yu.doll

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.

A

#### Alf P. Steinbach

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

J

#### John Harrison

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

O

#### osmium

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.