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
Natasha_Volkova [10]
3 years ago
13

Write a program that asks the user for three strings.

Computers and Technology
1 answer:
Varvara68 [4.7K]3 years ago
5 0

Answer:

good luck djfjjdndnfjfjjfjfdsadd

You might be interested in
Energy consumption is measured in units of kilowatt hours (kWh). The more kWh a household use in a month, the higher the energy
3241004551 [841]

Answer:

The c# program for the scenario is given below.

using System;

public class Program {

 double total = 0;

 static void Main() {

     Program ob = new Program();

   Console.WriteLine("Enter total energy used in kilo watts ");

   int p;

   p = Convert.ToInt32(Console.ReadLine());

   ob.bill_calculator(p);

   Console.WriteLine("Total charge for " + p + " kilo watts of energy is " + ob.total);

 }

 public void bill_calculator(int e)

 {

     int first=500;

     double chg_one = 0.12, chg_two=0.15;

     if(e <= 500)

     {      

         total = (e * chg_one);

     }

     else if(e > 500)

     {

         total = ( first * chg_one);

         total = total + ((e-first) * chg_two);

     }

 }

}

 

OUTPUT

Enter total energy used in kilo watts                                                                                                          

5555                                                                                                                                          

Total charge for 5555 kilo watts of energy is 818.25

Explanation:

The program is designed to take user input but does not implements validation for the user input.

The program works as follows.

1. Inside main(), the user enters the energy consumed in kilo watts.

2. This is stored in the integer variable, p.

3. The method bill_calculator() is called which accepts the value of p as a parameter.

4. If the energy used is 500 or less kilo watts, charges are different. While for the amount of energy consumption for more than 500, charges are different.

5. The charges for both, 500 and less and more than 500 are stored in double variables.

6. The if-else statements are used to calculate the total charge based on the amount of power used.

if(e <= 500)

     {      

         total = (e * chg_one);

     }

     else if(e > 500)

     {

         total = ( first * chg_one);

         total = total + ((e-first) * chg_two);

     }

7. Since c# is an object-oriented programming language, any method outside main() is called using the object of the class. All code is written inside the class.

8. Next, the total charge is displayed by calling the bill_calculator() method through the object of the Program class.

9. The main() function has only void return type and hence, no value is returned.

7 0
3 years ago
Create a program that can be used to add two integers together. In the beginning, the user is asked to give two integers that ar
Gnesinka [82]

Answer:

Answer written in python.

Explanation:

#ask user for the first integer.

first_number = int(input("enter first number: "))

#ask user for the second integer

second_number = int(input("enter second number: "))

#add both and store in a variable, result.

result = first_number + second_number

#print out the result

print ( f"the answer to the problem is {result} calculated by adding {first_number} to {second_number}")

The worded lines after the # sign are called comments and are used to describe what the following lines of code does making it easier to read and understand by other programmers or by the same programmer coming back to it after a while.

3 0
3 years ago
Which three elements form a well-dimensioned drawing?
laiz [17]

Answer:

I think its D

lines graphics and symbols

8 0
3 years ago
The coding system that has just two characters is called:
cupoosta [38]

Answer:

A. Binary

Definition:

Pertaining to a number system that has just two unique digits 0 and 1. - binary code

6 0
3 years ago
Read 2 more answers
In night mode, you will want to use which of the following?
torisob [31]
In night mode, you will want to use a tripod. The correct answer is B. 
4 0
3 years ago
Read 2 more answers
Other questions:
  • All waves consist of a continuous series of _____.
    11·2 answers
  • What are chemical manufacturers required to provide to anyone who purchases or uses their chemicals for a work purpose? Select a
    8·2 answers
  • Which process refers to starting up a computer
    12·1 answer
  • What happens when a computer gets a virus?
    6·2 answers
  • what are the three parts to physical security standards for various types of army equipment and the risk level
    15·1 answer
  • Please helpppp me!! thank youuu :)
    13·1 answer
  • Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
    7·1 answer
  • JAVA
    9·1 answer
  • web analytics can tell you many things about your online performance, but what can analytics tools not tell you​
    8·1 answer
  • What is the error in this program?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!