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. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    2

    Thumbs down Currency Converter

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

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,157
    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

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    2

    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");

    /*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?

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    /*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.

    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.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Currency Converter - stream pull
    By verbity in forum C# Programming
    Replies: 3
    Last Post: 10-18-2008, 05:29 PM
  2. converter currency in C
    By MyRedz in forum C Programming
    Replies: 7
    Last Post: 10-16-2008, 10:39 PM
  3. Basic C Help - Currency Converter
    By liljp617 in forum C Programming
    Replies: 9
    Last Post: 09-07-2008, 10:12 PM
  4. Newbie Help: Currency Converter
    By Ashfury in forum C Programming
    Replies: 10
    Last Post: 11-06-2005, 12:21 PM
  5. currency converter
    By Shalinee in forum C++ Programming
    Replies: 1
    Last Post: 03-19-2003, 02:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21