Posts

Showing posts with the label simple if else

GTU PPS Program - 16

Image
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 Previous Program Next Program

YouTube