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
saw5 [17]
3 years ago
11

Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t

he outer quotes). In one of the variables use quoted string and in the other do not use it.
Computers and Technology
1 answer:
stich3 [128]3 years ago
8 0

Answer:

Let the two string type variables be var1 and var2.  The value stored in these two variables is : The "use" of quotations causes difficulties.

  • The variable which uses quoted string:

          string var1 = "The \"use\" of quotations causes difficulties.";  

  • The variable which does not use quoted string:

string var2 = "The " + '\u0022' + "use" + '\u0022' + " of quotations causes difficulties.";

  • Another way of assigning this value to the variable without using quoted string is to define a constant for the quotation marks:

const string quotation_mark = "\"";

string var2 = "The " + quotation_mark + "use" + quotation_mark + " of quotations causes difficulties.";

Explanation:

In order to print and view the output of the above statements WriteLine() method of the Console class can be used.

   Console.WriteLine(var1);

   Console.WriteLine(var2);

In the first statement escape sequence \" is used in order to print: The "use" of quotations causes difficulties. This escape sequence is used to insert two quotation marks in the string like that used in the beginning and end of the word use.

In the second statement '\u0022' is used as an alternative to the quoted string which is the Unicode character used for a quotation mark.

In the third statement a constant named  quotation_mark is defined for quotation mark and is then used at each side of the use word to display it in double quotations in the output.

You might be interested in
The ____ section of the project plan should describe the major project functions and activities and identify those individuals w
harkovskaia [24]

Answer:

Option(c) is the correct answer to the given question .

Explanation:

The Project responsibilities section is responsible of the planning of project.

Following are the Roles of the Project Responsibilities

  • To check the objective of the project goals.
  • Works with customers and  to define and meet client needs and the overall objective .
  • Cost estimation and expenditure production of the project
  • Ensure the fulfillment of the client .Analysis and enterprise risk management. and Tracking the progress of project.

All the others options are not responsible of the planning of project that's why Option(c) is the correct answer .

7 0
3 years ago
Brainstorm what you want your LED board to do. What would need to happen first? What happens next?
lbvjy [14]
First it will glow then change what color you want
5 0
3 years ago
Read 2 more answers
1. Data in a smart card can be erased
Ostrovityanka [42]

Answer:

false

true

false

true

true

5 0
3 years ago
Read 2 more answers
____________improves the understandability of a website, by maintaining similar design elements throughout.
lora16 [44]

Simple and easy user interface design can help the users understand what they can do on the website, without confusion when they are loading on the website.

Best practice on the users experiences can help the users to visit the website easily and get what they want as fast as possible. It is the way to improve a website understandability.

4 0
3 years ago
You are asked to develop a cash register for a fruit shop that sells oranges and apples. The program will first ask the number o
vaieri [72.5K]

Answer:

customers = int(input("How many customers? "))

for i in range(customers):

   name = input("Name of Customer " + str(i+1) + " ")

   

   print("Oranges are $1.40 each.")

   oranges = int(input("How many Oranges? "))

   

   print("Apples are $.75 each.")

   apples = int(input("How many Apples? "))

   

   bill = oranges * 1.4 + apples * 0.75

   

   print(name + ", you bought " + str(oranges) + " Orange(s) and " + str(apples) + " Apple(s). Your bill is $%.1f" % bill)

Explanation:

*The code is in Python.

Ask the user to enter the number of customers

Create a for loop that iterates for each customer. Inside the loop, ask the user to enter the name, number of oranges, number of apples. Calculate the bill. Print the name, number of oranges, number of apples bought and total bill

5 0
3 years ago
Other questions:
  • Which of the following can be sources of sediment? A. fragments of other rocks B. chemicals and minerals dissolved in water C. s
    11·1 answer
  • A. true
    6·1 answer
  • What can be said about the equipment used by photographers during the Civil War?
    13·2 answers
  • The part of the computer that contains the brain or the Central Park nursing unit is also known as
    10·1 answer
  • What is a single-user computer?
    8·1 answer
  • Which software-development methodology would be best if an organization needed to develop a software tool for a small group of u
    15·1 answer
  • customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft Pow
    5·1 answer
  • Why was it important for the date format to be standardized by the
    7·1 answer
  • Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input ord
    14·1 answer
  • What is the first thing animators need to determine when beginning a project?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!