GTU PPS Program - 16

16. Write a C program to input an integer number and check the last digit of number is even or odd.

#include<stdio.h>
#include<conio.h>
int main()
{
    int num;
    printf("\nEnter any number : ");
    scanf("%d",&num);
    if(num%2==0)
        printf("\nentered number is even");
    else
        printf("\nEntered number is odd");
    getch();
    return 0;
}

Sample output

16. Write a C program to input an integer number and check the last digit of
  number is even or odd

Comments

YouTube

Popular posts from this blog

Atomic elements of Java

GTU OS Program - 11 Filters

Encapsulation, Inheritance & Polymorphism - OOP principles