Write a script in which you save the amounts 10, 15, 180, 92, 144 and 11 € to a vector.
Use the function done in the previous exercise to convert the amounts to dollars, pounds and yens (coefficients of conversion 1.2112, 0.68545 and 139.23 ). Print to the command window in the case of each currency a line with the mean of the converted amounts in the first column and the converted sums in the rest of the columns.
Write a script which ask program’s ”user” for the amounts should to convert (these are giving as vector). The program asks also for user to give currency (USA, Great Britain, Japan). The user gives the symbol of the currency (USD, GBP, JPY) and after that program displays to the command window initial amounts, converted amounts and mean value of converted amounts. All vectors have to displays as row vector! Use your functions in previous exercises.
Program have to identify the wrong values that user gives.E.g. currency which is not some of three
above-mentioned causes an error message and closes the program. Output example:
Give the amounts: [10 15 180 144 11] Give the currency (USD, GBP, JPY): USD
10 15 180 144 11
12.1120 18.1680 218.0160 174.4128 13.3232
Mean of the converted amounts: 87.2064
Give the amounts: [10 15 180 144 11]
Give the currency (USD, GBP, JPY): FIM