answersLogoWhite

0


Best Answer

// this v'll work to obtain sum of 1st and last number of any number

#include

int main()

{

int num,sum=0,i,fd,ld;

printf("enter the number);

scanf("%d",&num);

ld=n%10; //will get the last digit

while(num!=0)

{

fd=n;

n/10; //to get the 1st digit

}

sum=fd+ld; //add 1st n last digit

printf("\n sum of 1st n last digit is %d",sum)

}

User Avatar

Wiki User

โˆ™ 2011-12-06 02:14:09
This answer is:
User Avatar
Study guides

Algebra

20 cards

A polynomial of degree zero is a constant term

The grouping method of factoring can still be used when only some of the terms share a common factor A True B False

The sum or difference of p and q is the of the x-term in the trinomial

A number a power of a variable or a product of the two is a monomial while a polynomial is the of monomials

โžก๏ธ
See all cards
3.74
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
1196 Reviews

Add your answer:

Earn +20 pts
Q: Write program for sum of first and last digit of a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What value will the units digit of the number 20082008 be?

8 : the units digit is the first digit to the left of the decimal point if you had to write one in.


What is next to number series 15 225 3325 44325 5?

next number to this series is 554325. its look like this 15--add 1 to first digit and we get 2 and repeat two times and leave other digit.225 225-- its first digit is 2 and add 1 to it get 3 and write two time and write remaining digit as 3325. 3325-- its first digit is 3 and add 1 to it get 4 and write two time and write remaining digit as 44325. 44325-- its first digit is 4 and add 1 to it get 3 and write two time and write remaining digit as 554325.


If a 4 digit number is input through the keyboard write a C program to obtain the sum of first and last digit of this number?

#include<stdio.h> #include<conio.h> void main(void) { int num, a, b, sum; printf(""Please enter a four digit number: ""); scanf("%d", &num); a=num/1000; // retrives the first digit(left most digit) b=num%10; //retrieves the fourth digit(right most digit) sum=a+b; printf("The sum of first and last digit is %d", sum); }


Which is the first digit in 27080?

This first digit is the first number. In this case the first digit is the number 2.


What is the leading digit?

A leading digit is the digit/number at the beggining of a decimal number or regular number and is the first number to the left.


What is the first two digit prime number?

The first two-digit prime number is 11.


What is the tens digit in the first odd number?

0 is the ten's digit of the first odd number.


How do you find the position of the first digit of a quotient?

first you look at the first number tell what that number is then you just find the first digit.


Why dividing a three digit number by one digit number the first digit of the quotient is in the tens place?

It does not have to be. 864/2 = 432. The first digit of the quotient is not in the tens place.


What is the first triple digit pentagonal pyramidal number?

first triple digit pentagonal pyramidal number is 126


The first digit of a three digit is 2 greater than the second digit the last digit is 4 times the first digit what is the number?

208


What is a three digit prime number?

The first 'three digit' Prime Number is 101.

People also asked