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
Write a function named enterNewPassword. This function takes no parameters. It prompts the user to enter a password until the en
zloy xaker [14]

Answer:

def enterNewPassword():

 while True:

   password = input("Enter password: ")

   has_digit = False

   for i in password:

     if i.isdigit():

       has_digit = True

       break

   

   if not has_digit or (len(password) < 8 or len(password) > 15):

     if len(password) < 8 or len(password) > 15:

       print("The password length must be between 8 and 15!")

     if not has_digit:

       print("The password must include at least one digit!")

   else:

     return password

print(enterNewPassword())

Explanation:

*The code is in Python.

Create a function named enterNewPassword that takes no parameter

Create an indefinite while loop. Inside the loop, ask the user to enter the password. Initialize the has_digit as False, this will be used to check if password contains a digit or not. Create a for loop, that that iterates through the password, if one character is digit, set the has_digit as True and stop the loop (Use isdigit() to check if the character is digit or not).

After the for loop, check if has_digit is false or the length of the password is not between 8 and 15. If the length of the password is not between 8 and 15, print the error. If has_digit is false, again print the error.

Otherwise, password met the requirements and return the password

Call the enterNewPassword() function and print the result

4 0
3 years ago
DLucy is planning to launch her podcast on career guidance for college students and has already recorded a few videos for market
KIM [24]

Answer:

A. FilmoraGo; C. Adobe Premiere

Explanation:

Many video editing software exists out there, but their function is pretty much the same. They edit, mix and customize clips to create beautiful multimedia content for different purposes (advertisements, podcasts, movies, comedy clips, etc.). This software used are different as some may contain more functions and setting than the other.

Let us take a brief dive into the options:

  1. FilmoraGo: is a video editing software that runs on Andriod and iOS. It contains many effects and it is pretty basic to use and understand.
  2. Google Photos: Created by Google, helps to organize your photo albums and stores them for you.
  3. Adobe Premiere: is also a video editing software, it was first launched in 2003 and has since evolved to contain more sophisticated video editing tools.
  4. Audacity: is an audio editor available for Windows, Mac OS, and Linux. This software is completely free and open source.

Hence, dLucy can use the FilmoraGo or the Adobe Premiere to edit her video clips.

6 0
3 years ago
The default _____ color is set when you type text.
Elenna [48]
The default hyperlink color is automatically set when you type
5 0
3 years ago
How to make a water bottle rocket??
k0ka [10]
This question should be in physics so this is my answer in C&T format-go to a online shop and order one or the pieces then follow the instructions that will be given.
6 0
3 years ago
For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
Mnenie [13.5K]
Answer: True






Explanation:
6 0
3 years ago
Other questions:
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • A Trojan horse is a program that copies itself repeatedly using up resources and potentially shutting down a network. true or fa
    11·1 answer
  • Describe three perimeter intrusion detection systems and give an example of one that you have seen deployed either at work or an
    8·1 answer
  • Select the correct answer.
    13·2 answers
  • Choose the answer that best completes the
    8·2 answers
  • What are some ways you can give staying off your phone a "boost" and make it easier to do?
    9·1 answer
  • In this exercise, you are asking the user to set a alpha numeric password for any website. Put some conditions.
    8·1 answer
  • What is 5 times 5 times 16 times 11 2345
    6·2 answers
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
  • Yusuke has been a fan of online games for as long as she can remember. She particularly loves the role-playing games that allow
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!