Convert the following pseudocode to C++ code. Be sure to define the appropriate variables. Store 25 in the speed variable. Store 15 in the time variable. Multiply speed by time and store the result in the distance variable. Display the contents of the distance variable.

Respuesta :

Answer:

int main()

{

   int speed = 25, time = 15;

   int distance = speed * time;

   cout<<"The distance is: " << distance <<endl;

   return 0;

}

Explanation:

- Initialize the variable speed as 25 and time as 15

- Calculate the distance by multiplying speed and time

- Print the distance