# Currency Converter

This is a discussion on Currency Converter within the C Programming forums, part of the General Programming Boards category; I am trying to write a currency converter for a class, I cant figure it out. Can anyone help?...

1. ## Currency Converter

I am trying to write a currency converter for a class, I cant figure it out. Can anyone help?

2. Yes, we can help. What have you got that we can help you with?

3. ## Here is what I have so far

/*Currency Converter i got this off of www.xe.net/ucc*/
/*The lightbulb has come on, AND SOMEONE IS ACTUALLY HOME!!*/
#include <stdio.h>
main (void)
{
printf(" Currency Conversion As of June 11, 2003 2:35am GMT\n"); /*Trying to center*/
printf(" 1 Lire = 0.000603049 USD \n");

/*I can not tell a lie*/

printf(" 1 Yen = 0.008464602 USD \n");

/*Almost a yes*/

printf(" 1 UK Pound = 1.65123 USD \n");

/*Just curious*/

printf(" 1 Mexico Peso = 0.0940910 USD \n");

/*Que paso?*/

printf(" 1 Canadian Dollar = 0.734061 USD \n");

return 0;
getche();
}
now how do i get this to actually run, lets say if I wanna know how many yen I have with \$148 US...my question is how do I write in the calculations?

return 0;
getche();
}
now how do i get this to actually run, lets say if I wanna know how many yen I have with \$148 US...my question is how do I write in the calculations?
If you're going to "borrow" code you find online, at least make sure it works right. The getche call never executes there. It's after the return statement.

Back on topic: Don't be so damn helpless. Use that thing you call a brain. How do you think you do it? Break it down into small steps. Write one step, make sure it works, later, rinse, repeat.

Here, I'll give you an outline; pesudo code if you will:
Code:
```prompt user for amount of Yen
read amount from keyboard into variable
apply formulae to variable, store this in another
display said variable```
I usually start at the top of the list and work my way down, but you may have some other method you prefer...

Quzah.