Computer Science, asked by rajeshkumar16186, 5 months ago

write a program to input a number and check the number is even or odd using if
else.​

Answers

Answered by DHEERAJ0720
2

Answer:

#include <stdio.h>

void main()

{

   int num1, rem1;

 

   printf("Input an integer : ");

   scanf("%d", &num1);

   rem1 = num1 % 2;

   if (rem1 == 0)

       printf("%d is an even integer\n", num1);

   else

       printf("%d is an odd integer\n", num1);

}

Explanation:

pls mark me as the brainliast

Similar questions