blob: 1f85ff0d2ed6240dc15f665d1def27638f5af7eb (
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 = 10;
float coeffOfFriction = 0.3;
float weight = 6.0;
/*calculate and display acceleration */
printf("Acceleration a = %f(m/s^2)\n",(pullforce-coeffOfFriction*weight*FORCE_OF_GRAVITY)/weight);
return 0;
}
|