All pastes #611838 Raw Edit

Untitled

public text v1 · immutable
·published 2007-07-10 02:32 UTC
rendered paste body
int 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;
}