mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-17 14:12:58 +00:00
b1238af49d
this will probably upset people
31 lines
252 B
C
31 lines
252 B
C
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
double x,v0,g,t,d;
|
|
|
|
x=10.0;
|
|
d=0.0;
|
|
v0=0;
|
|
g=-9.8;
|
|
|
|
#define T 0.01
|
|
|
|
for(t=0;t<10;t+=T) {
|
|
|
|
x+=v0*T;
|
|
v0+=g*T;
|
|
|
|
if (x<0) v0=-v0;
|
|
|
|
printf("%.2f %.2f\n",t,x);
|
|
|
|
|
|
|
|
}
|
|
|
|
(void)d;
|
|
|
|
return 0;
|
|
}
|