j

Monday, 2 November 2015

Write a program that take a number from user and display its last digit



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,ld;
printf("Enter any number ::");
scanf(“%d”,&n);
ld=n%10;
printf("The last digit of %d is %d”,n,ld);
getch();
}

Subscribe to this Blog via Email :