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: 54% (11 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...
-
One way to move the branch resolution one stage earlier is to not need an ALU operation in conditional branches. The branch instructions would be BEZ Rd,Label and BNEZ Rd,Label, and it would branch...
-
ZeeZee's Construction Company has the opportunity to select one of four projects (A, B, C, or D) or choose the null (do-nothing) alternative. Each project requires a single initial investment and has...
-
1. What capabilities of an ERP system would be useful for a company like Just Sofas? 2. Describe the environment under which the ERP system was being implemented. Was due diligence conducted in...
-
Find all complex roots of the following equations: (a) z + 64 = 0 (b) z5 +243 = 0 Write the result in the conventional form, i.e., as a sum of the real and imaginary parts. Show all details of work.
-
941, SUTA and 940 Tax Return Preparation Ingram Heating & Cooling reports the following earnings and deductions for their employees for ...
-
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...
-
Solve for the indicated letter. Where noted, the given formula arises in the technical or scientific area of study. V = IR + Ir, for R (electricity)
-
Red light ( = 7 0 0 nm ) is diffracted by a single slit, and the first intensity minimum ( the first dark fringe ) occurs at = 4 . 0 degree . What is the width of the slit?
-
"In what ways does the sociological perspective on deviance diverge from the conventional wisdom that attributes deviant behavior solely to inherent moral flaws in individuals?"
-
What is the relationship between Work, the initial Kinetic Energy, and the final Kinetic Energy? Make a claim and support it with evidence and reasoning. Use some data and calculations as part of...
-
5. (10 points) Suppose that the government considers a new "social insurance" program: a payment to renters who got evicted by their landlords (it is an insurance against an evil landlord). Can you...
-
The following data represents the weekly supply and demand schedules for same quality one-topping large pizzas for delivery in Madison during the summer months. Price Qsup Qdem 14 10,000 30,000 16...
-
Mandeep, the president of Cool Air Inc., a public company, asked the controller to reclassify $1 million of cash payments for interest from the operating activities section to the financing section...
-
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...
-
A teapot with a brewer at the top is used to brew tea, as shown in Fig. P3-143. The brewer may partially block the vapor from escaping, causing the pressure in the teapot to rise and an overflow from...
-
Search and locate a current international issue (an issue that affects more than one culture). 1. Describe the issue 2. Define and discuss the two or more cultures involved in the issue 3. Explain...
-
How is ethics defined in research and why is it important? Discuss two different ways in which ethics can be compromised when conducting, using, and reporting data. Describe strategies that can be...
Study smarter with the SolutionInn App