Answer to Question #188568 in C++ for ayla

Question #188568

Write a complete program that will convert Malaysian Ringgit to Japanese Yen and Singapore Dollar. The user will have to input an amount in Malaysian Ringgit and the program will then display its equivalent amount in Japanese Yen and Singapore Dollar.

Note: 1 Japanese Yen is 0.040 Malaysian Ringgit 1 Singapore Dollar is 3.03 Malaysian Ringgit


1
Expert's answer
2021-05-03T07:53:49-0400
#include <iostream>
using namespace std;


int main() {
	double amountMalaysianRinggit;
	double amountJapaneseYen;
	double amountSingaporeDollar;
	cout << "Input an amount in Malaysian Ringgit: ";
	cin >> amountMalaysianRinggit;
	//1 Japanese Yen is 0.040 Malaysian Ringgit 1 Singapore Dollar is 3.03 Malaysian Ringgit
	amountJapaneseYen=amountMalaysianRinggit/0.040;
	amountSingaporeDollar=amountMalaysianRinggit/3.03;
	//display its equivalent amount in Japanese Yen and Singapore Dollar.
	cout<<"\nAmount in Japanese Yen is: "<<amountJapaneseYen;
	cout<<"\nAmount in Singapore Dollar is: "<<amountSingaporeDollar;


	cout<<"\n\n";
	system("pause");
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS