Computer Science, asked by mandapallilahari2001, 1 month ago

write a program ti check whether the given number is even or odd on simple if statements​

Answers

Answered by shahzadiasra123
1

Explanation:

// Find number is even or odd

#include<stdio.h>

#include<conio.h>

void main()

{

int a;

clrscr();

printf("\n Enter Any Number : \n");

scanf("%d",&a);

printf("----------------------\n");

if(a%2==0)

{

printf("\nNumber is Even.\n");

}

else

{

printf("\nNumber is Odd.\n");

}

getch();

}

Similar questions