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 large bin of mixed nuts contains peanuts, cashews, almonds, and walnuts. Luke scoops out a bowl full of nuts and counts how many of each type he has: 18 peanu
The price of pair of shoes is $63.20. The sales tax rate is 4.5 percent. How much sales tax would you pay if you bought these shoes
What was the cause of the Crusades. Help now
what factors led to world war 1?
how many times greater is one hour then one miuntes
how many grams in 1 and a quarter grams
Which was a characteristic of the English government of the 18th century under the Hanoverian kings? A. Parliament had to be on guard against royal claims of di
I have moist skin but no scales, and two pairs of legs. Although I have lungs and live on land, my young usually live in water and use gills to breathe.
Fred has a spinner that is split into four equal sections: red, blue, green, and yellow. Fred spun the spinner 912 times. Which of the following would be a goo
how many moles are in 100 grams of NaCl