a2p3(introprog1620 perry)

a2p3(introprog1620 perry) - acceleration = 3 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <stdio.h> #include <math.h> int main(void) { /* Declare variables. */ double time, velocity, acceleration; setbuf( stdout, 0); /* make stdout unbuffered */ /* Get time value from the keyboard. */ printf("Enter new time value in seconds: \n"); time=50; /* Compute velocity and acceleration. */ velocity = time*((time*(0.00001*time - 0.00488)) + 0.75795)+ 181.3566;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: acceleration = 3 - 0.000062*velocity*velocity; /* Print velocity and acceleration. */ printf(&quot;time= %8.3f s \n&quot;, time); printf(&quot;Velocity = %8.3f m/s \n&quot;,velocity); printf(&quot;Acceleration = %8.3f m/s^2 \n&quot;,acceleration); /* Exit program. */ return 0; } /*------------------------------------------------------------*/...
View Full Document

This homework help was uploaded on 04/08/2008 for the course ECE 1620 taught by Professor Perry during the Spring '08 term at Villanova.

Ask a homework question - tutors are online