Question #52658

Write a MATLAB script to display currency conversion for US Dollar, British Pound, Euro with Singapore Dollar as the base Currency. Your output should show the equivalent values for USD, GBP, EURO for every Singapore dollar in increments of 1 dollar until 25 dollars.

Expert's answer

clc,close all,clear all
type=input('input type of currency to conversation to Singapoore dollar US Dollar -1, Pounds - 2, Euro 3\n');
q=input('please inout amount of money: ');
switch type
case 1
sum=q*1.33141964;fprintf(['Hello you want convert ', num2str(q),' US Dollars',' this is ', num2str(sum),' in Singapour dollars']);
case 2
sum=q*2.08736643;fprintf(['Hello you want convert ', num2str(q),' British Pounds',' this is ', num2str(sum),' in Singapour dollars']);
case 3
sum=q*1.48445301;fprintf(['Hello you want convert ', num2str(q),' Euro',' this is ', num2str(sum),' in Singapour dollars']);

end

LATEST TUTORIALS
APPROVED BY CLIENTS