img
Question:
Published on: 3 December, 2024

Write a C program to check a number is even or odd.

Answer:
#include<stdio.h>
#include<conio.h>
main()
{
	int n;
	printf("\n enter any number");
	scanf("%d",&n);
	if(n%2==0)
	 printf("\n the number is even");
	else
	 printf("\n the number is odd");
	getch();  
}


Output:

Random questions