summaryrefslogtreecommitdiff
path: root/accel_def-macro.c
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-02-06 11:26:44 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-02-06 11:26:44 -0500
commit97a693d996c79fb2a008b19750d8bb45512e01a2 (patch)
tree6df17bfe7de7c59f7b1083828d71a91e61fae9fa /accel_def-macro.c
downloadengr0016-master.tar.gz
engr0016-master.tar.bz2
engr0016-master.zip
Inital commitHEADmaster
Diffstat (limited to 'accel_def-macro.c')
-rw-r--r--accel_def-macro.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/accel_def-macro.c b/accel_def-macro.c
new file mode 100644
index 0000000..83b08cc
--- /dev/null
+++ b/accel_def-macro.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+#define M_G 9.81
+
+int main()
+{
+ /*Variables*/
+ double mu = 0.2;
+ double m = 5.0;
+ double p = 20.0;
+
+ double a = (p-mu*m*M_G)/m;
+
+ printf("Acceleration a=%f(m/s^2)\n",a);
+ return 0;
+ }