/* * Name: * Collaborator(s): * Instructor: * Date: * Assignment: * Description: */#include <stdio.h>#include <stdlib.h>#include <math.h>int main(void) { int year1, dist1; float v, r, t, x; float g; float h; FILE *fp; fp = fopen("punkindata.txt.", "r"); fscanf(fp, "%d %d", &year1, &dist1); r = dist1; g = pow(9.8039 , 2); x = M_PI/4; //45 degrees is equal to PI/4 v = sqrt(g*r/sin(2*x)); t = (2*v/g)*sin(x); h = (pow(v,2)/2*g)*(pow(sin(x),2)); /* t being time v being velocity, g being the accelleration of gravity, and r being the range */ printf("%f", h); getchar(); return 0;}