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
r-ruslan [8.4K]
4 years ago
11

Write a C++ program that stores the integers 50 and 100 in variables and stores the sum of these two in a variable named total.

Display the total on the screen.
Computers and Technology
1 answer:
Troyanec [42]4 years ago
8 0

Answer:

Following are the program in c++

#include <iostream> // header file

using namespace std; // namespace

int main() // main function

{

int a=50,b=100,total; // variable declaration

total=a+b; // sum of the two variable a and b

cout<<"The total is:"<<total; // display total

return 0;

}

Output:The total is:150

Explanation:

In this program we have declared two variable i.e "a" and "b" of int type which store the value 50 and 10 respectively.After that we adding these two variable and store the sum in total variable finally display the total

You might be interested in
View focuses on the text and content of a document, without much information on the page layout.
Semmy [17]
Read View
you also can choose a background color
5 0
3 years ago
Which of the following is not anadvantage of simulation?
kari74 [83]

Answer: Ability to derive optimal solutions

Explanation:

One of the main disadvantages of simulation is ability to derive optimal solutions. As, the solution does not required to have a closed form and  procedure does not require any weighting and the hard constraint.  Stimulation outcome are not optimal to induced specific response because of the lack of quantitative models.

3 0
3 years ago
The spellchecker can be found in which two locations in most wordprocessing software?
bogdanovich [222]
Editing tab or in the same section as the find comand
8 0
4 years ago
What are possible challenges for cyber bullying
Anestetic [448]

Answer:

well, you will have your account deleted/ arrested because of cyber bullying

Explanation:

so don't!!! (hint hint XD)

6 0
3 years ago
Read 2 more answers
What is the value of the average variable after the following code is executed? var sum = 0; var prices = [14, 10, 9, 12, 11, 14
Reika [66]

Answer:

The value of average is 11

Explanation:

Analyzing the program line by line

This line initializes sum to 0

var sum = 0;

This line defines an array named prices and it also fills it with integer values.

var prices = [14, 10, 9, 12, 11, 14, 10, 8];

The italicized lines is an iteration that adds every element of prices and saves the result in variable sum

<em>for( var i = 0; i < prices.length; i++ ) { </em>

<em>sum = sum + prices[i]; </em>

<em>}</em>

At this point, the value of sum is 88

The next line divides the value of sum (88) by the length of the array (8) which gives 11.

11 is then saved in variable average

var average = sum/prices.length;

4 0
4 years ago
Other questions:
  • Can someone show me a image of this completed I will mark brainliest!!! It's typing.com
    11·1 answer
  • for which is a chart legend used? a.all of the time b.whenever you are comparing data that is the same c.whenever you are compar
    9·2 answers
  • A(n) _____ is a type of computer crime perpetrator whose primary motive is to achieve financial gain.
    5·1 answer
  • To what does the term computer hacking refer?
    10·2 answers
  • Do you believe that technology has indeed flattened the world in terms of providing
    8·1 answer
  • Create the following matrix M: 1 7 13 19 25 ?-3 9 15 21 27 5 11 17 2329By writing one command and using the colon to address ran
    8·1 answer
  • A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following
    11·1 answer
  • Anyone know the friends song by Marshmello? It's stuck in my head.
    12·2 answers
  • Rudy accidentally sent a sensitive work report to a personal friend named James instead one of his co-workers, who is also named
    6·1 answer
  • What kind of software consists of programs designed to make users more productive and/or assist them with personal tasks?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!