#include<stdio.h>intmain(){floata,b;printf("———————————————————————————————————————————");printf("\nProgram to check the equality of given numbers");printf("\n———————————————————————————————————————————");printf("\nEnter the 1st number ");scanf("%f",&a);printf("\nEnter the 2nd number ");scanf("%f",&b);if(a<b){printf("\n%f is less than %f",a,b);}elseif(a==b){printf("\n%f is equal to %f",a,b);}else{printf("\n%f is greater than %f",a,b);}printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to check the equality of given numbers
———————————————————————————————————————————
Enter the 1st number -10
Enter the 2nd number -50
-10.000000 is greater than -50.000000
———————————————————————————————————————————
kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to check the equality of given numbers
———————————————————————————————————————————
Enter the 1st number 10
Enter the 2nd number 50
10.000000 is less than 50.000000
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.