C File =>
/* Define a macro EQUALNUM to compare two numbers x and y which gives 1 if they are equal and 0 otherwise. Use this in main.*/
#include<stdio.h>
#define EQUALNUM(a,b) (a==b?1:0)
int main(){
int n,m;
int flag;
printf("\n Enter two numbers : ");
scanf("%d%d",&n,&m);
flag=EQUALNUM(n,m);
if(flag==1)
printf("\n Numbers are EQUAL");
else
printf("\n Numbers NOT EQUAL");
return 0;
}
Comments
Post a Comment
Please do not enter any spam link in message.