Show Bid Request
Currency Conversion program using C
Bid Request Id: 13980
|
|
|
Description:
Here is the assignment:
Expand the "Currency Conversion" program to read in the conversion rates
from a file, rather than hard coding values. The input file should include
the currency name and its currency conversion rate. The program should be
able to read up to 20 currencies and their conversion rates, and present
menus of the proper length to the user. The program's error checking should
allow for varying number of currencies. Insert comments in the program to
document the program internally.
This is the first program:
/* Currency Conversion */
/* this program displays five currencies */
/* and their equivalents to a US Dollar */
#include <stdio.h>
int main(void)
{
/* declare the variables */
float USD,EGP,AUD,CHF,JPY,CAD,EGP1,AUD1,CHF1,JPY1,CAD1;
USD = 1.0;
EGP1 = 4.62000;
AUD1 = 1.90791;
CHF1 = 1.67022;
JPY1 = 127.633;
CAD1 = 1.58318;
/* print text to screen and tak input */
printf("\nPlease enter the US amount that you would like to convert: ");
scanf("%f", &USD;);
/* do conversion */
EGP = USD * EGP1;
AUD = USD * AUD1;
CHF = USD * CHF1;
JPY = USD * JPY1;
CAD = USD * CAD1;
/* output the results */
printf("\nUnited States Dollar: %.2f = %f Egypt pounds", USD, EGP);
printf("\nUnited States Dollar: %.2f = %f Australia",USD, AUD);
printf("\nUnited States Dollar: %.2f = %f Switzerland Francs", USD, CHF);
printf("\nUnited States Dollar: %.2f = %f Japan Yen", USD, JPY);
printf("\nUnited States Dollar: %.2f = %f Canada", USD, CAD);
getch();
return 0;
This is what I got so far on the next part but i am stuck:
/* this program displays five currencies */
/* and their equivalents to a US Dollar */
# include <stdio.h>
#define CONVERSION 5
#define SIZE 5
#define i
long mult(int * start, int * end);
float USD,AUD,CHF,JPY,CAD
int main(void)
{
/* intitalize the total currencies */
const float [CONVERSION] [SIZE] =
{
{1, 1.90791, 1.67022, 127.633, 1.58318},
{1, 1.66622,131.916,1.58869,1.88158},
{1.66645,1,79.1707, 0.953424, 1.12928},
{0.00758266,0.0126347,1, 0.0120479,0.0142707},
{0.531360,0.885235,70.0618,0.844007,1}
};
/* print text to screen */
printf("Enter the a letter for your conversion\n");
printf("A. USD B.Australia\n");
printf("C. Switzerland D. Japan\n");
printf("E.Canada\n");
scanf("%d", &USD;);
static char* conversion[CONVERSIO
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
Windows platform
Must be 100% finished and received by buyer on:
Apr 21, 2002 12:00:00 PM EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
|
$10 (USD)
|
Apr 19, 2002 9:44:09 AM EDT
|
9.97
(Excellent)
|
|
|
I can do it for you with good, simple and easy to understand comments. It will be ready in a couple of hours |
|
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Apr 19, 2002 10:30:48 AM EDT
|
9.97
(Excellent)
|
|
|
Here is the finished project. Accept my bid and I will send you the source code will full comments
|
|
Attached File
|
|
|
|
|