Question: my code isnt printing and im not sure why. here's my code: // midtermc++.cpp : This file contains the 'main' function. Program execution begins and

my code isnt printing and im not sure why.
here's my code:
// midtermc++.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include
using namespace std;
int main ()
{
// time
int time = 0;
// height
int height = 3;
// loops until ball hits the ground so it won't go into negatives
while (time >= 3)
{
// h = 3 + 10t - t^2
height = 3 + (10 * time) - (time * time);
// go up in increments of 1
time++;
cout << "Height- " << height << " " << "Time-" << time << ' ';
return 0;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!