I am trying to write a currency converter for a class, I cant figure it out. Can anyone help?
I am trying to write a currency converter for a class, I cant figure it out. Can anyone help?
Yes, we can help. What have you got that we can help you with?
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
/*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");
/*Is that bad ehh?*/
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./*Is that bad ehh?*/
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?
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:
I usually start at the top of the list and work my way down, but you may have some other method you prefer...Code:prompt user for amount of Yen read amount from keyboard into variable apply formulae to variable, store this in another display said variable
Quzah.
Hope is the first step on the road to disappointment.