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
serg [7]
4 years ago
7

You are given two variables, already declared and assigned values, one of type double, named price, containing the price of an o

rder, and the other of type int, named totalNumber, containing the number of orders. Write an expression that calculates the total price for all orders.
Computers and Technology
1 answer:
Oksi-84 [34.3K]4 years ago
7 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

//variable to store input

double price;

int totalNumber;

// variable to store total price

double total_price;

cout<<"Enter the price of an order:";

// read the price of an order

cin>>price;

cout<<"Enter the number of orders:";

// read the total number of orders

cin>>totalNumber;

// calculate total price of all orders

total_price=price*totalNumber;

cout<<"total price of all orders: "<<total_price<<endl;

return 0;

}

Explanation:

Declare three variables "price" of double type,"totalNumber" of int type And "total_price" of type double.Read the value of an order and number of orders. The calculate the total price by multiply "price" with "totalNumber" and assign it to variable "total_price". Print the total price.

Output:

Enter the price of an order:12.5                                                                                                                              

Enter the number of orders:3                                                                                                                                  

total price of all orders: 37.5

You might be interested in
Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
Rom4ik [11]

Answer:

No

Explanation:

You had the whole week for the essay but didn't do it and then turned it in late.

6 0
3 years ago
What is one way to maintain Internet safety? a) avoid interacting with people on the Internet. B) avoid giving out information a
Anarel [89]
To be safe on the Internet, we must avoid giving out personal information.
4 0
4 years ago
Which of the following best explains the concept of a prototype
gladu [14]
A prototype<span> is an early sample, model, or release of a product built to test a </span>concept<span> or process or to act as a thing to be replicated or learned from. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming.</span>
3 0
3 years ago
A switch is a central network device that connects network nodes such as workstations and servers in a physical ____ topology
Black_prince [1.1K]
<span>A switch is a central network device that connects network nodes such as workstations and servers in a physical Star topology</span>
8 0
3 years ago
How do I type fast?<br><br> Give me an actual answer...
Ugo [173]
Practice!
And a good keyboard I recommend mechanical key boards
But the best way to improving your WPM is definitely practice one way you can practice is playing typeracer it’s pretty fun way

Hope this helps!
Brainliest is much appreciated!
7 0
3 years ago
Read 2 more answers
Other questions:
  • #A year is considered a leap year if it abides by the #following rules: # # - Every 4th year IS a leap year, EXCEPT... # - Every
    5·1 answer
  • How would you say an hard drive works
    9·2 answers
  • 1. When centering one paragraph on a page of text, the user needs to _____.
    15·2 answers
  • Write a class called Line that represents a line segment between two Points. Your Line objects should have the following methods
    8·1 answer
  • A store sells rope only in whole-foot increments. Given three lengths of rope, in feet, the following code segment is intended t
    13·2 answers
  • The number of pixels displayed on the screen is known as ________.
    13·1 answer
  • You are utilizing BitLocker Drive Encryption, and are attempting to update Windows Server 2016. What must be done so that the up
    14·1 answer
  • Items that are cut or copied are placed on the Clipboard.
    6·2 answers
  • Simple interest will always pay more interest than compound interest.
    14·1 answer
  • Hyperlink is a term used to refer to the specific manner of specifying the address of a website. Write reason for true or false.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!