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>
void main()
{
int last,num;
printf("Enter the number: ");
scanf("%d",&num);
last=num%10;
if(last%2 ==0)
printf("%d digit is Even",last);
else
printf("%d digit is odd",last);
getch();
}

#OUTPUT:


Comments

Popular posts from this blog