libbygillespie1749 libbygillespie1749
  • 18-01-2020
  • Computers and Technology
contestada

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

Respuesta :

ijeggs
ijeggs ijeggs
  • 18-01-2020

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

Answer Link

Otras preguntas

In a triangle ABC, AD is drawn perpendicular to BC. Prove that AB2 - BD2 = AC2 - CD2.
How do nationalists betray patriots?
Evaluate. 33+1⋅9+12 24 30 48 264
What happens when an oceanic plate collides with a continental plate? Select one: a. Neither plate moves under the other. b. The continental plate moves under t
What color of light in the visible spectrum appears brightest? does this mean that it is the highest energy light?
Hey y'all mind helping me with this geometry problem, I would really appreciate it :)
which of the Earth's layers is comprised mainly of extremely hot liquid metals
A 500-kg elevator is raised to a height of 10 m in 10 seconds. Calculate the power of the motor.
What made the Spanish Conquest of the Incas easier? A) a plague B) civil war C) the road systems D) the Incas didn't have weapons
How would you factor 3x^2-6x+3?? Help!