Code:#include <stdio.h> #include <string.h> #include <math.h> void read(); int Time, RH, retv; float DewPointC; float DryTempC; float val, val1; float VPD,vapourp, setvapp; char line[256]; FILE *in; int main() { in = fopen("KBIS_2005.txt", "r"); read(); return 0; calculate(); return 0; } void read() { int i; for(i = 0; i<=240; i++) { fgets(line,256,in); retv=sscanf(line,"%d %f %f %d",&Time,&DewPointC,&DryTempC,&RH); if (!retv) continue; printf("%d items read: %d %f %f %d\n",retv,Time,DewPointC,DryTempC,RH); val = ((7.5 * DewPointC) / (237.7 + DewPointC)); vapourp = pow(611, val); val1 = ((7.5 * DryTempC)/(237.7 + DryTempC)); setvapp = pow(611, val1); VPD = setvapp - vapourp; printf("VPD IS %f",VPD); if(VPD < 0.5) { printf("value is %d",1); } else { printf("val is %d",0); } } } in this code i tried to apply the formula to the first line too..but it is not taking the data from the first line.it is taking from the 1 line but i need from line 0. help me.