希望你的时间还够。
程序代码:
#include<stdio.h> int main() { double g, x0, y0, vx, vy, ts, te, dt; double x, y, t; g = 9.8; x0 = 0; y0 = 0; vx = 20; vy = 20; ts = 0; te = 5; dt = 0.1; for(t = ts; t <= te; t += dt) { x = vx * t + x0; y = vy * t - g / 2 * t * t + y0; printf("%f,%f\n", x, y); } return 0; }
重剑无锋,大巧不工