Posts

Showing posts with the label equation

Second Equation of motion, How to implement using C language

Image
The second equation of motion is used to calculate the displacement of an object under constant acceleration. Algorithm:  Without wasting any of your precious time let's try to understand how the algorithm is implemented. want to check the implementation of the Third equation of motion,   click here. The second equation of motion is s = u*t + 1/2 * a * t * t s: total displacement u: initial velocity t: time taken by the journey a: constant acceleration as you can see in our program we are considering  u=0  if you want you can set initialVelocity variable value as per your choice or you can ask it from user too also acceleration value is 9.8 equal to the gravity of earth. want to check the implementation of the first equation of motion,   click here. In a function  fallingDistance  we have implemented the equation. total_dist = 9.8 * i * i * 1/2 + u * i ; total_dist = (4.9 * i * i) + (u * i); Code: #include // this is the implementation of 2nd equation...

Third Equation of motion, How to implement using C language

Image
The third equation of motion is used to deduce the relation between initial velocity, final velocity, displacement, and acceleration without time. Third equation of motion Algorithm: Without wasting any of your precious time let's try to understand how the algorithm is implemented. want to check the implementation of Second equation of motion , click here. Third equation of motion is v * v = u * u + 2 * a * s s: total displacement u: initial velocity v: final velocity a: constant acceleration In function CalculateDisplacement, we are calculating the value of displacement. want to check the implementation of First equation of motion, click here. as you can see in our program we are considering u=0 if you want you can set initialVelocity variable value as per your choice or you can ask it from user too. Code: #include stdio.h //please make it correct // this is the implementation of 3rd equations of motion. void CalculateDisplacement(float a,float u,float v){ float displacement=...

First Equation of motion, How to implement using C language

Image
The first equation of motion is used to calculate the final velocity of an object under constant acceleration. Algorithm:  Without wasting any of your precious time let's try to understand how the algorithm is implemented. The first equation of motion is want to check the implementation of Second equation of motion ,  click here. v = u + a * t u: initial velocity t: time taken by the journey a: constant acceleration as you can see in our program we are considering u=0 if you want you can set initialVelocity variable value as per your choice or you can ask it from user too, accel=5 and timeOfJourney=7. want to check the implementation of the Third equation of motion,   click here. In function, finalVelocityWithConstantAcceleration we have implemented the equation. final_velocity = u * a * i Code: #include // this is the implementation of 1st equations of motion. void finalVelocityWithConstantAcceleration(int accel,float u,int xtime){ float final_velocity=0; printf...