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

Estimate the quotient by rounding the expression to relate to a one digit fact
Translate the following words to algebra symbols, using "n" as the variable. Ten less than a number is 15.
the scarlet letter whats an example of meatphor
write the reaction of acetyl salicylic acid with sodium bicarbonate
write the value of the digit 8 in in the number 385722
how many solutions to make 20pence using a 1pence 2pence 5pence 10pence 20pence
Shawntelle is solving a problem involving a triangular pyramid. You hear her say that "bee" is equal to 24 inches. How can you tell if she is talking about the
How does inertia affect a person who is not wearing a seatbelt during a collision?
what does it mean when it is said that a woman "nocked him off his rocker"?
What does privatization do?