Re: Euros to dollars

From: Bjorn Abelli (DoNotSpam.bjorn_abelli_at_hotmail.com)
Date: 02/13/05


Date: Sun, 13 Feb 2005 17:33:20 +0100


"Cappy" wrote...

> I'm a begginner. Please help.
> I need to write some code that will convert eruos to dollars. I was
> hoping that someone could push me in the right direction.

1. Define the problem

The "problem" seems pre-defined...

2. Outline the solution

How would you calculate it *without* a computer program? Write down *that*
solution...

3. Develop the outline into an algorithm

Exhange the variables in your equation to program variables.
Let constants be literals to begin with.

4. Test the algorithm for correctness

If you can't do it by hand, you'll probably not be able to make a program
for it either.

5. Code the algorithm into a specific programming language

So, code it in Java...

Use primitive datatypes for the variables, and exchange the literals to
constants.

6. Run the program on the computer
7. Document and maintain the program

// Bjorn A



Relevant Pages

  • Re: iterative copying of binary expression trees
    ... I pass the stack as an argument. ... I have already such a tail-recursive, purely functional, first order solution ... You said you push the left son into a stack, ... You can do the exact same thing to create your algorithm. ...
    (comp.lang.lisp)
  • Re: vector::push_back performance
    ... > execution time. ... Do you think you could go to an algorithm where you push less back? ... > studied the library source and I have a hard time understanding it, ...
    (comp.lang.cpp)
  • Re: Simple answer, surrogate factoring
    ... > Even this thread contains an algorithm which should work perfectly. ... > If you push me on details I get annoyed, ... > I'm the theoretical amateur mathematician. ... Theoretically, you're an amateur mathematician. ...
    (sci.crypt)
  • Re: Simple answer, surrogate factoring
    ... > Even this thread contains an algorithm which should work perfectly. ... > If you push me on details I get annoyed, ... > I'm the theoretical amateur mathematician. ... Theoretically, you're an amateur mathematician. ...
    (sci.math)
  • Re: Flat-schmat! [was Re: Python syntax in Lisp and Scheme]
    ... Again, it's that balance thing. ... > preferred structure on an algorithm which has its own structure ... your mind would impose a preferred structure to the solution. ... programming language must support your favored way of thinking. ...
    (comp.lang.python)

Loading