[Cialug] Algorithm
David Stout
cialug@cialug.org
Fri, 14 Jan 2005 14:18:12 -0800 (PST)
--0-210941593-1105741092=:88433
Content-Type: text/plain; charset=us-ascii
Thank you. I was not thinking this is a very easy question. I have an answer. Yes it is homework I have to write a program to do this. So I am still doing the coding my self I just needed a while to get the brain in gear.
Dave Weis <djweis@sjdjweis.com> wrote:
On Fri, 14 Jan 2005, David Stout wrote:
> Without using logic just integer arithmetic what would the algorithm be
> for finding how many quarters, dimes, nickles & penneys in .92.
I would start by using modulo arithmetic on the number of cents in each
coin to determine the number, then subtract the value as you go, ending up
with pennies.
Good luck on your homework.
--
Dave Weis "I believe there are more instances of the abridgment
djweis@sjdjweis.com of the freedom of the people by gradual and silent
encroachments of those in power than by violent
and sudden usurpations."- James Madison
_______________________________________________
Cialug mailing list
Cialug@cialug.org
http://cialug.org/mailman/listinfo/cialug
David Stout
Business Forms Analyst & Student
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--0-210941593-1105741092=:88433
Content-Type: text/html; charset=us-ascii
<DIV>Thank you. I was not thinking this is a very easy question. I have an answer. Yes it is homework I have to write a program to do this. So I am still doing the coding my self I just needed a while to get the brain in gear.<BR><BR><B><I>Dave Weis <djweis@sjdjweis.com></I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>On Fri, 14 Jan 2005, David Stout wrote:<BR><BR>> Without using logic just integer arithmetic what would the algorithm be <BR>> for finding how many quarters, dimes, nickles & penneys in .92.<BR><BR>I would start by using modulo arithmetic on the number of cents in each <BR>coin to determine the number, then subtract the value as you go, ending up <BR>with pennies.<BR><BR>Good luck on your homework.<BR><BR>-- <BR>Dave Weis "I believe there are more instances of the abridgment<BR>djweis@sjdjweis.com of the freedom of the people by gradual and silent<BR>encroachments of those in power than by violent<BR>and sudden usurpations."- James Madison<BR>_______________________________________________<BR>Cialug mailing list<BR>Cialug@cialug.org<BR>http://cialug.org/mailman/listinfo/cialug<BR></BLOCKQUOTE></DIV><BR><BR>David Stout<br>Business Forms Analyst &
Student<p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com
--0-210941593-1105741092=:88433--