blob: 6b61c6900c24634109f763117199621fb6cff176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* Find the acceleration */
#include <stdio.h>
int main()
{
static float FORCE_OF_GRAVITY = 9.81;
int pullforce = 20;
float coeffOfFriction = 0.2;
float weight = 5.0;
/*calculate and display acceleration */
printf("Acceleration a = %f(m/s^2)\n",(pullforce-coeffOfFriction*weight*FORCE_OF_GRAVITY)/weight);
return 0;
}
|