Introduction: I'm building a simple program to input the coordinates of two numbers from user and print the distance between those coordinates.
Issue: The problem is that the compiler isn't letting me set y1 as a float variable. If I change y1 to ycord1 or any other variable name, the program works fine.
I'm having no issues setting x1 and z1 as float variables, the problem is only with y1.
Here's the screenshot of the error I'm getting:

The Code:
#include <stdio.h>
#include <math.h>
float square(float, float);
float x1, y1, z1;
float x2, y2, z2;
float distance = 0;
int main(int argc, const char * argv[]) {
printf("Enter coordinates of Point 1: ");
scanf("%f, %f, %f", &x1, &y1, &z1);
printf("Enter coordinates of Point 2: ");
scanf("%f, %f, %f", &x2, &y2, &z2);
distance = sqrtf(square (x2, x1) + square (y2, y1) + square (z2, z1));
printf("Distance between the 2 points is %.3f\n\n", distance);
return 0;
}
float square(float a, float b)
{
float c = a - b;
c = c * c;
return c;
}
I've tried 2 different compilers but both are producing the same error.
I tried searching Is y1 a reserved variable in C on Google, but couldn't find any meaningful results. Let me know if I also need to provide a screenshot of the code working when I replace y1 with any other variable.