From 6369691a540520661cb1693f4aa75b1731a937ab Mon Sep 17 00:00:00 2001 From: Shivam Chaudhary Date: Thu, 9 Feb 2023 18:32:22 +0100 Subject: [PATCH] Add more cases to convert currency to YEN and YUAN --- src/currencyExchange.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/currencyExchange.c b/src/currencyExchange.c index 2a22334..83bf372 100644 --- a/src/currencyExchange.c +++ b/src/currencyExchange.c @@ -7,6 +7,13 @@ float convert(float euro, int newCurrencyCode) { case CURRENCY_CODE_GBP: return ( euro * GBP_RATE_OF_ONE_EURO ); + + case CURRENCY_CODE_JAPANESE_YEN: + return ( euro * JAPANESE_YEN_RATE_OF_ONE_EURO ); + + case CURRENCY_CODE_CHINESE_YUAN: + return ( euro * CHINESE_YUAN_RATE_OF_ONE_EURO ); + } return -1;