I have this small C program and I am unable to locate the mistake. Can someone help me locate it?
Code:
#include<stdio.h>
int main()
{
float a=0.0,b=0.0;
float a1=0.0;
a1=1.05;
b=0.05;
printf("\na1=%f\tb=%f\n",a1,b);
a=a1-1.0;
printf("\na=%f\tb=%f\n",a,b);
if(a<b)
printf("\nHELLO:b is greater than a\n");
else
printf("\ncondition is not satisfied");
printf("\n");
}
The program is supposed to print "Condition is not satisfired", but instead the program gives "HELLO:b is greater than a"
Hope someone can help me locate the error.
Thanks in advance.