Hi, can someone make a C++ program of Currency Converter using function which takes a value from user and convert it into (Rupees,Dollar,Pound) the format of function should be like this
void my_Currency_converter(amount,current_currency,new_currency,currency_exchance_Rate)
eg, my_Currency_converter(50,R,P,150)
Please help, as my exam is next week and I need all the help I could get.
Have practiced loops (while, for), Conditional Statements etc.. Kinda finding difficulty with problems related to Functions, Arrays, Multi Dimensional Arrays, passing arrays to functions, using characters in arrays/functions , matrix multiplication etc. That's all the part of the syllabus tho .
Well, there is tons of content on google and youtube explaining exactly how functions, arrays, 2D arrays, passing arrays to functions and everything else you said works. So go look for it and start implementing. Break down your project into pieces and atleast get started with anything.
If you get stuck on a specific thing feel free to post your code and ask a question, we'll help out.
You should get started by referencing the math behind the conversions, start with what you know and don't get confused by the parts that are more difficult. You may also use only floats to make your life a little bit easier.. Use "if" statements to check the currencies..
If you were really bothered about getting help with this problem, you'd make an effort to do the things that would make it more likely that people would help you, such as:
- using code tags to make your code readable (http://www.cplusplus.com/articles/z13hAqkS/)
- actually telling us what the problem is, rather than lazy, meaningless nonsense like "It has some problem and giving me some errors"
Should we, therefore, conclude that you're not really that interested in getting answers?
If I knew what the problem is why would I be posting in here ?
If you have no clue what the problem was, that means you didn't try to compile it, since compiling it would result in a compiler error that you could, perhaps, share with the folks who might like to help you. But, if you can't even be bothered to attempt to compile your own code...
No I have complied and tried to run it and its giving me errors that I'm not able to figure out. Lemme try to copy paste the errors here.
C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp In function 'int main()':
71 54 C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp [Error] expected ',' or '...' before 'new'
72 1 C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp [Error] a function-definition is not allowed here before '{' token
75 1 C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp [Error] expected '}' at end of input
Ok managed to get rid of the last error i.e expected '}' at the end of the input one, now these errors still remain.
C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp In function 'int main()':
71 54 C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp [Error] expected ',' or '...' before 'new'
72 1 C:\Users\Salahuddin\Documents\New Folder 3\Currency Convertor.cpp [Error] a function-definition is not allowed here before '{' token
Because its not working, the other program where you only need to tell your current and new currency and the exchange rate is mentioned in the cout , works without any program .