Home Forums C Programming Basic C Help — Currency Converter

Viewing 2 reply threads
  • Author
    • #2134

      **I don’t expect an immediate answer, just need some simple help**

      Write a computer program in C which will request the user to enter a number representing the amount of foreign currency he/she would like to exchange. Your program should output a foreign currency conversion table for at least 6 different currencies, showing how much of each type of foreign currency can be obtained for the amount the user enters.

      The example below shows a foreign currency exchange table for one unit of foreign currency. Your program is interactive and so should work for any input amount from the user not just 1.00. In the example table, the number entered by the user is 1, and it shows that 1 USD is equal to 0.547525 GBP, while 1 GBP is equal to 2.11928 AUD and so forth. If the user enters 2, your table should show how much 2 USD is in GBP, CAD, EUR, etc. along with how much 2 CAD would be in EUR, GBP, USD, etc, for each of the 6 currencies. The example uses real graphics not ASCII-art so it is ok if your table is not as visually pleasing.

      So far this is what I’ve done:

      All the “|” should line up obviously to make it look like a table, but the forum formatted it oddly.

      The basic gist of the program is that the user will input a currency amount (in $US) they wish to convert. After they input the currency amount, the program is supposed to output that table with all the conversions. It should output the entire table every time they put in a currency amount to convert. Inside the actual cells, should be a number going two decimal places (I’m aware it’s %.2f to get that).

      Anyway, I don’t even know if I’ve done everything up to this point correctly. But if I have, my next step (I assume) would be to do the actual conversions. And I don’t particularly know how to do that or what to do. Would I do the conversions within each individual cell in the table? How would I do that? Or would I do them somewhere outside of the table and store them as a variable of some sort and then input that variable into the table somehow?

      If someone could give an example of how they would do the first row (USD across) or describe how they would do it, that would be great.

      Any help/direction/corrections is welcome and very much needed. I know it’s not hard, but this is the very first bit of programming I’ve ever done so…

      Thanks in advance for any help at all.

    • #3450
      M. Saqib

      how to use miles from hawaiian airlines platinum card
      delta sky miles card offers
      tam cards
      alaska airline card deals
      best airline mileage card
      rewards card flight
      us air miles card with no annual fee
      best frequent flier cards
      cards with free miles reward
      50000 miles card offer

      top frequent flyer credit card
      best bank air miles credit card
      freqent flyer master card vis
      airline credit card free anual fee
      airline miles credit card visa delta
      capital one credit card air
      mileage plus credit card bonus offers
      lufthansa miles and more card in the usa
      visa acceptance milesplus
      air line cradit card
      credit card offer free airline mile
      chase no hassle milage
      credit card for travel mile
      aeromexico american express fee
      frequant flyer miles credit cards
      capital one no hassle miles redemption
      credit cards with united airline miles
      frequent flyer member
      mastercard mileage incentives
      juniper carnival sea miles credit
      free airline ticket promotions 2008
      us airways credit card promotions
      southwest credit card by chase
      yale visa card travel rewards
      mastercard amalgamated chicago redeem miles
      bank one value miles credit card
      delta american express credit
      one pass miles key bank
      credit card virgin application
      american express us airways credit card
      mnba and american express and free miles
      delta travel credit card
      flights on any airline
      capital one miles rewards bonus
      delta credit card with airline offer
      “??? delta skymiles??® options credit card”
      become a frequent flyer with usa 3000 airlines
      credit cards with airmiles credit
      american airlines application online
      free credit card mileage
      credit card reward miles non airlines
      free membership on jet blue credit card
      no annual fee mileage visa
      aer lingus creadite card
      united mileage no annual fee
      airline credit cards for two
      mileage credit card and comparison of features
      top rated miles rewards
      convert southwest points
      credit card offers with airline benefits

    • #3451

      could do something like this ( I’m not real good with stdio.h , In school I used iostream.h ) :

      heres a good link on some of the printf() options: http://www.thinkage.ca/english/gcos/expl/c/lib/printf.html

Viewing 2 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.