j

Monday, 2 November 2015

Write a program that take 5 digit number and find the sum of first and last digit



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,a,b,sum;
printf("Enter 5-digit number:");
scanf(“%d”,&n);
a=n/10000;
b=n%10;
printf("The sum of first and last digit is ",a+b;
getch();
}

Subscribe to this Blog via Email :