C Programming Related Problem 04

Write down a program Code in C which can determine Even or Odd number for a given input.

Following Coding(Using if else Case)

#include <stdio.h>

int main ()

{

    int num  ;

    printf("Enter the number Please :");

    scanf("%d", &num);

    if (num % 2 == 0)

    {

        printf("%d is Even Number", num);

    }

    else

    {

        printf("%d is Odd Number", num);

 

    }

    return 0;

}

Comments

Popular posts from this blog

Hajir Biriyani with recipes

Freelancing

Python Programming Language & Used for