Solution:
#include<stdio.h>
#include<conio.h>
main()
{
float x,y;
printf("Enter First Number : ");
scanf("%f",&x);
printf("Enter Second Number : ");
scanf("%f",&y);
if(x==y)
printf("The Numbers Are Equal.");
else
if(x>y)
printf("First Number Is Bigger Than Second.");
else
printf("Second Number Is Bigger Than First.");
getch();
}
Program Analysis :
The condition was to compare two float number and that's why we declare float data type variable "x" and "y" .First we take the first number from terminal or user and then we went for second.
We put the expressions and write this program by using a chain of "if else if".That's It..................
Post a Comment