j

Monday, 2 November 2015

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



#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,ld;
cout<<"Enter any number ::";
cin>>n;
ld=n%10;
cout<<"The last digit of "<<n<<" is "<<ld;
getch();
}


Subscribe to this Blog via Email :