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

A protein deficiency resulting in swelling of the body tissue primarily in the feet, legs, and belly is called A. marasmus B. kwashiorkor C. ketosis
Please help, due tonight. A.Write an equation of the line in slope-intercept form that passes through the point and given slope. (0, -9) and slope = 4 B. The ta
President Wilson’s Fourteen Points were largely unsuccessful in bringing about lasting peace because the League of Nations had a strong rivalry between its memb
PLEEASSE HELP I GIVE THANKS!!!!!!
In division why should the remainder not be greater than the divisor
what's the expression of 2000 divided by 50
What is the main difference between mechanical and electromagnetic waves?
Which occurs during transcription
What is the current drawn if the voltage is 9V and resistance is 1.5 ohms ? A) 6 A B) 7.5 A C) 10.5 A D) 13.5 A
subtract 7 12 times from 95