Question: C - Programming used on raspberry pi 3 Fill in the code under the while loop. Projectile motion #include #include float distanceTravel(float h0,float tInc,float v,float
C - Programming used on raspberry pi 3
Fill in the code under the while loop. Projectile motion
#include
#include
float distanceTravel(float h0,float tInc,float v,float theta)
{
const float G=9.8;
float h,t,x;
t=0.0;
h=h0;
while (h>0){
/*add your code here*/
}
return x;
}
int main() {
float theta=35.0*3.1416/180;
float v=10;
float h0=1.0;
float tInc=0.001;
float x;
x=distanceTravel(h0,tInc,v,theta);
printf("%2.2f",x);
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
