Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions