Help to understand the condition. I kind of did, but not sure. Help the result to write to the file.
int main() { int x,y; FILE *f = fopen("y.txt", "r"); printf ("Vvedite perenemyu X = "); scanf ("%d", &x); if (x >= 10) y = 1; else if (x > -0.5 && x < 10 && x != 0) y = 0; else if (x < -0.5) y = -1; fprintf(f,"y = %d\n",y); fclose (f); return 0; } 
хis still zero or 0.5? - Igor