Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having trouble writing the following program in C++. My output messages seem to be working correctly but it is not calculating my input

I am having trouble writing the following program in C++. My output messages seem to be working correctly but it is not calculating my input value. Can anyone tell me what I'v done wrong?

Write a program that will convert U.S. dollar amounts to Japanese yen and to euros, storing the conversion factors in the named constants YEN_PER_DOLLAR and EUROS_PER_DOLLAR. Use the constants in your calculations, not the numeric literals. Use the following currency exchange rates: 1 dollar=98.93 Yen 1 dollar=0.74 Euros

//Write a program that will convert U.S. dollar amounts to Japanese yen and to euros. //1 dollar=98.93 Yen //1 dollar=0.74 Euros

#include using namespace std; int main() { float USD; const float Yen_per_dollar=98.93; const float Euro_per_dollar=0.74; float dollar_to_yen= USD * Yen_per_dollar; float dollar_to_euro= USD * Euro_per_dollar; cout<<"Please enter a US dollar amount to be converted."; cin>> USD; cout<<"There are "<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

What is monopoly?

Answered: 1 week ago