Untitled
public text v1 · immutableint time = 0;
float velocity, acceleration, height = 0;
int main()
{
FILE *newfile;
newfile = fopen("rocket.txt", "r");
if(newfile == NULL)
{
printf("File cannot be opened\n");
}
else
printf("File Successfully opeened for reading\n");
while(fscanf(newfile, "%d %f %f %f", &time, &height, &velocity, &acceleration) != EOF)
printf("%d %f %f %f\n", time, height, velocity, acceleration);
fclose(newfile);
system("PAUSE");
return EXIT_SUCCESS;
}