1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
miss Akunina [59]
3 years ago
12

Write a C# program that converts currencies between British currency of pounds andpence, in which 1 pound contains 100 pence, an

d U.S. currency in dollars and cents.Assume an exchange rate of 1.6595 U.S. dollars per British pound. Give the user a menuto choose the type of conversion. Allow the user to repeat as often as desired. (See TestYour Understanding questions 39 and 41.)
Computers and Technology
1 answer:
Tju [1.3M]3 years ago
4 0
<span>Here's program. Add your own rate below, I've added commentary where. Try it: 
double amount;  
string currency;
Dictionary<string, double> factors = new Dictionary<string, double>(); factors.Add("GBP", 1.1111D);
factors.Add("USD", 1.11111D); // here you can add the rate you need 
Console.WriteLine("Please enter the amount of Euro you wish to be converted:");
        amount = double.Parse(Console.ReadLine());
Console.WriteLine("");
Console.WriteLine("Please choose the currency you wish to convert to:"); Console.WriteLine("USD");
Console.WriteLine("GBP"); Console.WriteLine("");
        currency = Console.ReadLine();
double factor;
if (factors.TryGetValue(currency, out factor))
{
Console.WriteLine("You have entered {0} EUR which converts to {1} {2}", amount, amount * factor, currency);
}
else
{
Console.WriteLine("You did not enter a recognised currency {1}", currency);
<span>}</span></span>
You might be interested in
What items should you evaluate when scouting the facilities at a shooting location?
Fiesta28 [93]

I would evaluate baggage and personal belongings, rooms or closets, people's clothing, and if anyone has a weapon.

3 0
3 years ago
Ali rolled a ball down a hill. This graph shows the kinetic and potential energy of the moving ball.
denis23 [38]
Ghhsususuhwbababahaha
8 0
2 years ago
Write a program whose input is two integers. Output the first integer and subsequent increments of 5 as long as the value is les
adell [148]

Answer:

Following are the code to the given question:

For code 1:

start = int(input())#defining a start variable that takes input from the user end

end = int(input())#defining a end variable that takes input from the user end

if start > end:#use if that checks start value greater than end value

   print("Second integer can't be less than the first.")#print message

else:#defining else block

   while start <= end:#defining a while loop that checks start value less than equal to end value

       print(start, end=' ')#print input value

       start += 5#incrementing the start value by 5

   print()#use print for space

For code 2:

while True:#defining a while loop that runs when its true

   data = input()#defining a data variable that inputs values

   if data == 'Done' or data == 'done' or data == 'd':#defining if block that checks data value

       break#use break keyword

   rev = ''#defining a string variable rev

   for ch in data:#defining a for loop that adds value in string variable  

       rev = ch + rev#adding value in rev variable

   print(rev)#print rev value

Explanation:

In the first code two-variable "first and end" is declared that takes input from the user end. After inputting the value if a block is used that checks start value greater than end value and use the print method that prints message.

In the else block a while loop is declared that checks start value less than equal to end value and inside the loop it prints input value and increments the start value by 5.

In the second code, a while loop runs when it's true and defines a data variable that inputs values. In the if block is used that checks data value and use break keyword.

In the next step, "rev" as a string variable is declared that uses the for loop that adds value in its variable and prints its values.

3 0
3 years ago
Proszę daje wszystko potrzebuje tego
Stolb23 [73]
I’m sorry I do not speak that
5 0
3 years ago
Read 2 more answers
Francis has designed a picture book appropriate for third graders. He wants teachers across the world to freely download use, an
mestny [16]

Answer:

The correct answer will be "Project Gutenberg".

Explanation:

  • Project Gutenberg continues to obtain lots of requests for authorization for using printed books, pictures, as well as derivatives from eBooks. Perhaps some applications should not be produced, because authorization would be included in the objects provided (as well as for professional usages).
  • You can copy, hand it over, or m actually-use it underneath the provisions including its license that was included in the ebook.

So that the above is the right answer.

8 0
3 years ago
Other questions:
  • What is a biometric scanner?
    8·2 answers
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • What is the purpose of an arraignment?
    9·2 answers
  • Super easy question but you have to think about it because it’s not that easy I’ll mark brainliest for first answer Explain the
    11·1 answer
  • Your boss is very skeptical about the idea of storing his files up in the cloud rather than on a local storage drive. He asks yo
    7·1 answer
  • Edie wants to visit her university's website. What software application should she use?
    9·2 answers
  • Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the t
    10·1 answer
  • which of the following can be represented by a sequence of bits. 1. An integer 2. An alphanumeric character 3. A machine languag
    12·1 answer
  • What Is the device used to produce hard copies from personal computer ​
    5·2 answers
  • ANSWER QUICKLY!!! <br><br> Which aspect of planning is a preventive action?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!