Purpose : write a program to convert US dollars into Euros and vice versa.
The goal of this project is to develop an interactive program that converts US dollar amounts into Euros and Euros into US dollars. A sample session (executed by me on a UNIX machine ``galois'') goes like :
[jan@galois]% ./proj1
Give amount : 123.45
123.45 US dollar(s) = 135.05 Euro(s)
123.45 Euro(s) = 112.83 US dollar(s)
[jan@galois]%
For this calculation, the following rates were used :
1 US dollar = 1.094 Euro
1 Euro = 0.914 US dollars
Observe that the rates have three decimal places after the dot
and the results are displayed with two decimal places.
(Hint: Use %.2f in the control string to print a
float in the requested format.)
Mind spelling mistakes in the dialogue with the user and the output.
The first line of your program should be like
/* MCS 260 Project One by <Author> */
where you replace the <Author> by your name.
The gcc compiler will be used to test your program. So even if you have developed your program in a Windows environment, test your code on icarus.cc.uic.edu with gcc.
The printout of your program will be collected
at the start of the lecture on Friday 7 September, at 1PM.
Before the deadline, send the code by e-mail to
janv@uic.edu from your account on icarus.
If you saved your program in the file proj1.c,
then you send your program typing on icarus the following
command :
mail janv@uic.edu < proj1.c
This ensures your program is free from any encapsulations.
Note that the e-mail address is my university netid and not
the address at the MSCS department.
If you have questions, comments, or difficulties, feel free to come to my office for help.