Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars
Question:
Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to Chinese RMB. Prompt the user to enter 0 to convert from U.S. dollars to Chinese RMB and 1 to convert from Chinese RMB and U.S. dollars. Prompt the user to enter the amount in U.S. dollars or Chinese RMB to convert it to Chinese RMB or U.S. dollars, respectively. Here are the sample runs:
Transcribed Image Text:
Enter the exchange rate from dollars to RMB: 6.81 -Enter Enter 0 to convert dollars to RMB and 1 vice versa: Enter the dollar amount: JEnter 100 -Enter $100.0 is 681.0 yuan Enter the exchange rate from dollars to RMB: 6.81 JEnter Enter 0 to convert dollars to RMB and 1 vice versa: 5 -Enter Enter the RMB amount: 10000 is $1468.43 Enter 10000.0 yuan Enter the exchange rate from dollars to RMB: 6.81 -Enter Enter 0 to convert dollars to RMB and 1 vice versa: JEnter Incorrect input
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 61% (13 reviews)
Currency Exchange Program plan Prompt the user to enter choice and exchange rate Convert from dollar...View the full answer
Answered By
Vasiullah khan
I am giving students home tutions for their academic growth. I was head of the class during my college while pursuing bachelor degree in civil engineering. I have one year of experiance in teaching Civil Engineering subject "Highway Construction"as a faculty in a college Nizam Institute of engineering & Technology Hyderabad. Currently i am working in a compony & i have three year of job experience in civil engineering in a real estate company.
my academic record is given below
• SSc from CVSBV Inter College Auraiya Uttar Pradesh in March 2008 with First Class (69%),
•
• Intermediate from SH Dariyav Singh IC Aligarh, Uttar Pradesh In march 2010 with first class (66.8%).
•
• B.Tech. in Civil Engineering from St. Mary’s Group of Institutions Hyderabad, Telangana in April 2016 with First Class(64.6%).
0.00
0 Reviews
10+ Question Solved
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run: Enter the first city: Chicago JEnter Enter the second city: Los Angeles JEnter...
-
Write a program that prompts the user to enter two strings and tests whether the second string is a substring of the first string. (Don?t use the indexOf method in the String class.) Analyze the time...
-
Write a program that prompts the user to enter a three-digit integer and determines whether it is a palindrome number. A number is palindrome if it reads the same from right to left and from left to...
-
Suppose that a firm is producing in the short run with output given by: Q = 200.5L 2.5L 2 , The firm hires labor at a wage of $25 per hour and sells the good in a competitive market at P = $50 per...
-
we define the first difference δf of a function f (x) by δf (x) = f (x + 1) f (x). 41. First show that satisfies δP = (x + 1). Then apply Exercise 40 to...
-
is the nations real GDP divided by its stock of labor and capital.
-
Discuss models of expertise in professional development.
-
Howard Bowen is a large-scale cotton farmer. The land and machinery he owns has a current market value of $4 million. Bowen owes his local bank $3 million. Last year Bowen sold $5 million worth of...
-
Line Item Value Line Item Value Corn 12,000 bu. $3.40 per bushel Prepaid Expenses $52,000 Soybeans 2,000 bu. $9 . 75 per bushel FBT Farm Truck $14,504 Machinery $425,000 FBT Land Note $180,679 Bldgs....
-
Mariam is a trader. On 1 March 202 the balances in her cash book were: Cash $100 debit Bank $494 credit The following transactions took place in March 202: March 4 Paid for repairs to office...
-
Revise Programming Exercise 2.8 to display the hour using a 12-hour clock. Here is a sample run: Listing 2.7, ShowCurrentTime.java, gives a program that displays the current time in GMT. Revise the...
-
Given a directed line from point p0(x0, y0) to p1(x1, y1), you can use the following condition to decide whether a point p2(x2, y2) is on the left of the line, on the right, or on the same line (see...
-
Many individuals learn more about the car they are thinking of buying than about the candidates running for president of the United States. Explain why.
-
Assume a Poisson distribution with =5.6. Find the following probabilities. a. X=1 b. X <1 c. X>1 d. X1 a. P(X=1)= (Round to four decimal places asneeded.) b. P(X <1)= (Round to four decimal places...
-
345879 The any reported the following January purchases and sales data for its only prauct. The company uses a perpetual inventory system. REQUIRED: Determine the cost assigned to ending inventory...
-
How do changing geopolitical landscapes, such as shifting alliances and emerging power centers, influence conflict resolution strategies, and what adjustments are necessary to address new global...
-
50 21 2. Determine the inclination and period of the satellite which produced the ground trace below. Show all calculations. Suteite 17 11-140-130-120-110 tonn an 20 6058 am 50 210 0 10 20 30 50 60...
-
This activity aims to provide practical experience in preparing tax forms related to business income and depreciation. It emphasizes the importance of accurate reporting and adherence to tax...
-
The toggle clamp is subjected to a force F at the handle. Determine the vertical clamping force acting at E.
-
Could a set of three vectors in span all of? Explain. What about n vectors in when n is less than m? R4
-
Write a program that reads a graph from a file and determines whether the graph is connected. The first line in the file contains a number that indicates the number of vertices (n). The vertices are...
-
Modify Listing 28.2, TestGraph.java, to create a file representing graph1. The file format is described in Programming Exercise 28.1. Create the file from the array defined in lines 821 in Listing...
-
The depth-first search algorithm described in Listing 28.8, Depth-First Search Algorithm, uses recursion. Design a new algorithm without using recursion. Describe it using pseudocode. Implement it by...
-
$48.00 per share is the current price for Foster Farms' stock. The dividend is projected to increase at a constant rate of 5.50% per year. The required rate of return on the stock, rs, is 9.00%. What...
-
a.) Annapolis Company has two service departments (Computer Operations & Maintenance Services). Annapolis has two production departments (Mixing Department & Packaging Department.) Annapolis uses a...
-
Hunter Corporation expects an EBIT of $31,480 every year forever. The company currently has no debt and its cost of equity is 14 percent. The tax rate is 21 percent. a. What is the current value of...
Study smarter with the SolutionInn App