Computer Science, asked by ayushichoubey8356, 1 year ago

Write a program in c to check whether a given number is even or odd

Answers

Answered by Anonymous
1

Answer:

C program to check odd or even without using bitwise or modulus operator

#include <stdio.h>

int main()

{

int n;

printf("Enter an integer\n");

scanf("%d", &n);

if ((n/2)*2 == n)

printf("Even\n");

Similar questions