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
Anettt [7]
3 years ago
6

Create a program the outputs the total cost of a lunch order. Users should be prompted to input the number of hamburgers, fries,

and drinks they want and the program should print the total cost of the order. The hamburgers cost 2.00, fries cost 1.50, and drinks cost 1.00. Be creative and professional in prompting the user for the information and in displaying the output.
Computers and Technology
1 answer:
Likurg_2 [28]3 years ago
4 0

Answer:

total = 0

hamburgers = int(input("Enter the number of hamburgers: "))

fries = int(input("Enter the number of fries: "))

drinks = int(input("Enter the number of drinks: "))

total = (hamburgers * 2.0) + (fries * 1.5) + (drinks * 1.00)

print("The total cost of the order is: " + str(total))

Explanation:

- Ask the user for the inputs

- In order to find the total cost, multiply each order cost with the number of orders. Then sum the each result.

- Print the total cost

You might be interested in
When choosing a new computer to buy, you need to be aware of what operating it uses.
Pavlova-9 [17]

Answer: Size & Form-Factor, Screen Quality,Keyboard quality,CPU, RAM, Storage,Battery Life, USB 3.0, Biometric Security,Build quality.

Explanation:

1 - 7 are the most important for laptops and for desktops 1,3,4,5and 6.

Hope this helped!

8 0
3 years ago
One benefit of taking notes in class is that the student
MrMuchimi

Answer:

A

Explanation:

you got to listen if you want to be smart

4 0
3 years ago
Database administrators must make sure that ________ and ________ techniques and procedures are operating to protect the databas
butalik [34]

Answer:

backup; recovery

Explanation:

Backup and recovery refers to the process of backing up data in case of a loss and setting up systems that allow that data recovery due to data loss. Backing up data requires copying and archiving computer data, so that it is accessible in case of data deletion or corruption. Data from an earlier time may only be recovered if it has been backed up.

Data backup is a form of disaster recovery and should be part of any disaster recovery plan.In some cases, backing up or restoring entire systems, or the enterprise, after an event or disaster can take days

5 0
3 years ago
Write a program that reads 20 integers from the user into an array and uses a function arrayMinimum that accepts an integer arra
neonofarm [45]

Answer:

#include <iostream>

using namespace std;

int arrayMinimum(int myArray[], int myArraySize) {

int small = myArray[0];

for (int i = 0; i < myArraySize; i++) {

   if(myArray[i]<small){

small = myArray[i];

}

 }

 return small;

}

int main(){

   int myArray[20];

   for(int i =0;i<20;i++){

       cin>>myArray[i];          

   }

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

Explanation:

This solution is provided in c++

#include <iostream>

using namespace std;

This line defines the arrayMinimum function

int arrayMinimum(int myArray[], int myArraySize) {

This initializes the smallest of the array element to the first

int small = myArray[0];

This iterates through the array

for (int i = 0; i < myArraySize; i++) {

This if condition checks for the smallest

   if(myArray[i]<small){

The smallest is assigned to the small variable

small = myArray[i];

}

 }

This returns the smallest

 return small;

}

The main method begins here

int main(){

This declares an array of 20 elements

   int myArray[20];

The following iteration allows user input into the array

<em>    for(int i =0;i<20;i++){ </em>

<em>        cin>>myArray[i];          </em>

<em>    } </em>

This calls the method and returns the minimum

   cout<<"The smallest is: "<<arrayMinimum (myArray,20);

   return 0;

}

6 0
3 years ago
what has become an established maritime commerce Center and one of the largest cities in the United states ​
coldgirl [10]

Easy! That would be the city of San Francisco!

7 0
3 years ago
Other questions:
  • The Modified Greiss chemical test is used to detect the presence of what chemicals that indicate muzzle to target distance?
    11·1 answer
  • What term is used to describe a function that uses an algorithm to convert an input of letters and numbers into an encrypted out
    9·1 answer
  • So I’m doing a PowerPoint of how social media changed my life any ideas what I should right down and what kind of topics should
    11·2 answers
  • An adiabatic capillary tube is used in some refrigeration systems to drop the pressure of the refrigerant from the condenser lev
    15·1 answer
  • A lack of financial literacy can cause you to lose your
    10·1 answer
  • Write a program that asks for the names of three runners and the time, in minutes (no seconds, etc.), it took each of them to fi
    7·1 answer
  • 2. The factorial of a positive integer n is the product of the integers from 1 to n. You can express the factorial of a positive
    6·1 answer
  • Why is science, mathematics, and technology different from engineering?
    15·1 answer
  • When you login to your blogging account. The first screen with all controls, tools and functions is called .... Select one: a. D
    10·1 answer
  • (1) Prompt the user to input an integer between 32 and 126, a float, a character, and a string, storing each into separate varia
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!