PPS Practical 16

PPS Practical 16
  • Aim: Write a C program to input an integer number and check the last digit of number is even or odd.
  • Code:
    //For turbo C++ remove below comments
    #include <stdio.h>
    //#include<conio.h>
    void main()
    {
        int d;
        // clrscr();
        printf("Enter Numbers : ");
        scanf("%d",&d);
        if (d%2==0){
            printf("Last number of digit is even");
        }else{
            printf("Last number of digit is odd");
        }
        // getch();
    }
  • Output:
  • Output of practical 16

Comments