为什么当c等于1的情况下,啥都输出不来呢?

给定椭圆方程和一个定点,求过定点的切线方程。
输入:
第1行:输入a2和b2的值,即x/a2+y/b2=1中的a2和 b2,保证 a2和b2均为整数且大于0。第2行:输入定点的坐标
输出:
切线方程或Input error!。
#include <stdio.h>
#include <math.h>
int main()
{
float a,b,m,n;
float c,d,e,f;
scanf("%f %f",&a,&b);
scanf("%f %f",&m,&n);
c=(mm)/a+(nn)/b;
d=b/n;
f=m/a;
e=d*f;
if (c<1||c>1)
{
printf("Input error!\n");
}
else if (c=1)
{
if (m=0&&n!=0)
{
printf("y=%f",n);
}
else if (n=0&&m!=0)
{
printf("x=%f",m);
}
else if (m!=0&&n!=0)
{
printf("y=%f-%fx",d,e);
}
}
return 0;
}

相等是c==1 不是c=1

所有的等号都是==,你写的都是一个=,所以错了。