Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script that converts between US dollars and Euros. ( Use a rate of 1 US = 0 . 7 E for this exercise.

Write a script that converts between US dollars and Euros. (Use a rate of 1 US =0.7 E for this exercise.) The script should take one numerical required argument and one optional argument (the currency, E or US). If the user gives two arguments, perform the conversion. If the user gives only one argument, a number, assume the number is given in US dollars, warn the user, and perform the conversion. If the user gives no arguments, print a statement explaining how to run it. Examples of test cases and resulting output are shown below: Input Output 45.32 E 45.32 Euros is equivalent to 64.74 US Dollars 55 Since you didnt specify a currency, Im assuming US to Euros. 55 US Dollars is equivalent to 38.5 Euros 100 US 100.00 US Dollars is equivalent to 70.00 Euros (No arguments) Usage: number {currency (US or E)} Example: 100 US

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

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions

Question

Is (log n)3- O(logn)? J ustily your

Answered: 1 week ago

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago

Question

2. Define identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago