Question: Your goal is to write a program that asks the user for a whole number of dollars to convert into two cryptocurrencies: Bitcoin and Ethereum.

Your goal is to write a program that asks the user for a whole number of dollars to
convert into two cryptocurrencies: Bitcoin and Ethereum. You will store the
conversion factors in the constants BTC_PER_DOLLAR and ETH_PER_DOLLAR (BTC
and ETH are the currency codes for Bitcoin and Ethereum). Use the following
formulas for calculating the exchange rates:
1 dollar =.000018 Bitcoin
1 dollar =.00044 Ethereum
Format your currency amounts in fixed-point notation with three decimals of
precision.
Your program should have the following:
A comment header with your name, date, and a description of the program (1
point)
Constants to hold the conversion factors with the given rates (2 points)
A variable to hold the number of dollars to convert (1 point)
Formatted output as described in the requirements that calculates the
resulting amount of Bitcoin and Ethereum and displays that to the user (use
the example output to guide your code. Remember, never type actual
numbers into the cout statements when you have variables for those values!)
(4 points)
Demonstrate your program by testing it with the value of 500 dollars (2
points) NOTE: Be sure to test with values other than 500 but use 500 when
you submit your results for the assignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!