Description
1) Read chapter 2 in your C book.
2) Programming assignment (100 pts):
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.
USD GBP CAD EUR AUD
1 1.8264 0.949938 1.46849 0.861801
0.547525 1 0.520114 0.80404 0.471857
1.0527 1.92265 1 1.54588 0.907218
0.680967 1.24371 0.646876 1 0.586858
1.16036 2.11928 1.10227 1.70398 1
Friday, August 29, 2008
All exchange rates in your program must be current and coded as constants. Make sure
you display a nice looking table using escape sequences and your ability to produce
beautiful ASCII-art. You program MUST be bug-free and well commented (Including
author information, program description, lab section, date, etc.)