Welcome to my simple currency converter project! This program, written in C, allows you to convert between various currencies. It's designed with failsafes, user input validation, and dynamic memory allocation, ensuring a smooth user experience.
Completion Time: 2 days
- Supports Multiple Currencies: Convert between a variety of currencies, including USD, EUR, GBP, JPY, CNY, and many more.
- Realistic Exchange Rates: Uses exchange rates accurate as of December 26, 2024, sourced from x-rates.com.
- Input Validation: Ensures only valid currencies and positive amounts are accepted.
- Error Handling: Handles invalid input and memory allocation failures.
- Modular Design: Functions are logically separated for ease of maintenance and readability.
- Clone the repository:
git clone https://github.com/jasmath03/simple-currency-converter.git
- Navigate to the project directory:
cd simple-currency-converter - Compile the program:
gcc -o simple-currency-converter main.c currency.c console_ui.c -Wall -Wextra
- Run the program:
./simple-currency-converter
- Follow the prompts to select your currency, enter an amount, and convert to another currency.
Enter a valid currency code (e.g., USD, EUR): EUR
Please enter the amount: 1000.00
Currency: EUR, Amount: $1000.00
What currency would you like to convert to?
Enter a valid currency code (e.g., USD, EUR): USD
You have 1000.00 EUR.
How much would you like to exchange? 1000.00
Currency: USD, Amount: $1040.91
- Fetch live exchange rates from an API.
- Make it an overall more robust program.
- Implement multi-currency conversions in a single session.
- Exchange rates were sourced from x-rates.com.
This project is for fun and practice. Feel free to use, modify, and distribute it as you like.
Thank you for checking out my project! Feedback and suggestions are always welcome.