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
svlad2 [7]
3 years ago
15

Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).

Computers and Technology
1 answer:
Minchanka [31]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int exam1 = 70;

   int exam2 = 85;

   int examAverage;

   examAverage = (exam1+exam2)/2;

   cout <<"The Average of Exam1 and Exam2 is: "<<examAverage<<endl;

   return 0;

}

Explanation:

Using the C++, we declare the three variables all of type

exam1

exam2 and

examAverage

We assign initial values of 70 and 85 to exam1 and exam2 respectively

You might be interested in
Bill's manager has asked him to send all staff members the directions for checking out the new projector. In 1–2 sentences, desc
Alex787 [66]

He should send an email to all of his colleagues to inform them of all of the directions. Emails are an easy and fast route to letting people know what's up.

- Mabel <3

6 0
3 years ago
Read 2 more answers
What refers to a metal combined with one or more other elements
alexira [117]
The correct answer is an Alloy.
8 0
3 years ago
Unless you specify otherwise, excel summarizes data by ____.
Lilit [14]
Unless you specify otherwise, excel summarizes data by  summing numeric data and counting data fields containing text.
<span> The most commonly used ways to </span><span>summarize data in excel are: pivot tables, autosum, sort, selection....
</span>
4 0
3 years ago
Write a program that sorts an array of 10 integers using bubble sort. In the bubble sort algorithm, smaller values gradually “bu
blsea [12.9K]

Answer:

#include<iostream>

using namespace std;

int main(){

   //initialization

  int arr1[10] = {2,4,6,1,7,9,0,3,5,8};

  int temp;

   int size_arr;

   //nested for loop

  for(int i=0;i<size_arr-1;i++){

   for(int j=0;j<size_arr-i-1;j++){

       if(arr1[j]>arr1[j+1]){ //compare

               //swapping

           temp = arr1[j];

           arr1[j]=arr1[j+1];

           arr1[j+1]=temp;

       }

   }

  }

  //display the each element

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

   cout<<arr1[i]<<" ";

  }

    return 0;

}

Explanation:

Create the main function and declare the variable and defining the array with 10 values.

take the nested for loop, nested loop means loop inside another loop.

the outer loop traverse in the array from 0 to size-1.

and inside loop traverse from 0 to size -i-1, because for every cycle of the outer loop the one element is sorted at the end. so, we do not consider the element from the last for every cycle of the outer loop. That's why (size-i-1)

In the bubble sort, the first element compares with the second element and if the first id greater than the second then swap the value. so, for the above algorithm, we take the if statement and it checks the condition if the condition becomes true then the swap algorithm executes.

we take a third variable for swapping. after that, if the outer loop condition false it means all elements will traverse and then the loop will terminate.

and finally, take another for loop and display the output.

8 0
4 years ago
How is functional text used in everyday life
expeople1 [14]
Cause you read every day
5 0
3 years ago
Other questions:
  • HELP PLEASE NOW ASAP BRAINLIEST
    13·2 answers
  • In what order does the air flow in a canister vacuum cleaner pass through the following components?
    11·1 answer
  • Explain the operation of POS
    10·1 answer
  • A small group of travelers is meeting inside an ancient building, and the travelers need access to the Internet using their mobi
    13·1 answer
  • 1. Assume you're using a three-button mouse. To access shortcut menus, you would
    6·2 answers
  • 4. You are planning to buy a new couch for your family room. Before you leave for the furniture store, you measure the available
    11·1 answer
  • In which situations would it be most helpful to filter a form? Check all that apply.
    8·1 answer
  • PLS HELP ME!! WILL GIVE BRAINLIEST
    7·2 answers
  • Sketch f(x) = 5x2 - 20 labelling any intercepts.​
    13·1 answer
  • Pick the correct statements on the 64-bit machine representation of numbers.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!