{ float u, v, w, x, mass; /*Variables declaration*/
printf("Enter the mass of the object(kg):"); /*Formatted output*/
scanf("%f", &mass); /*input mass value*/ printf("Enter the initial velocity(m/s):"); /*Formatted output*/ scanf("%f", &v); /*input initial velocity value*/ printf("Enter the time in motion(s):"); /*Formatted output*/ scanf("%f", &x); /*input time value*/
u = v + (g*x); /*Formula for final velocity*/
w = v*x + (0.5*g*(x*x)); /*Formula for distance traveled*/
printf("\nFinal velocity (Vf): %f\n", u); /*Output final answer*/
printf("Distance traveled (s): %f\n", w); /*Output final answer*/