Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started