-Write C program to find even and odd number using macro
-Write C
program to find even and odd number using macro
#include<stdio.h>
#define
number(n)((n%2==0)?1:0)
int main()
{
int num;
printf("enter
any number");
scanf("%d",&num);
if(number(num))
printf("number
is even");
else
printf("number
is odd");
return 0;
}
***************************Output***********************
amr@amrj-virtual-machine:~$
gccevenodd.c
amr@samr-virtual-machine:~$
./a.out
enter any number
2
number is
evensmj@amr-virtual-machine:~$
Ithunammanews provides all <a href="Latest News in Tamil</a> , Get All Breaking News, Sports News, Cinema News, Tollywood News, Health News in Tamil.
ReplyDeleteGreat! Our iot sims have specific uses and features that offer unique benefits to a business looking to improve or start their IoT and M2M connectivity.
ReplyDeleteMerkur Slots Machines - SEGATIC PLAY - Singapore
ReplyDeleteMerkur Slot Machines. sol.edu.kg 5 star www.jtmhub.com rating. The Merkur Casino https://febcasino.com/review/merit-casino/ game https://septcasino.com/review/merit-casino/ was the first to feature video slots in the entire casino,
Thanks bro
ReplyDeleteYeah output is correct
ReplyDelete