Math, asked by BullsEye7173, 9 months ago

Find the sum of first and last digit number

Answers

Answered by Anonymous
0

Answer:

Logic to find sum of first and last digit using loop

Input a number from user. ...

*To find last digit of given number we modulo *divide the given number by 10 . ...

*To find first digit we divide the given number by *10 till num is greater than 0 .

*Finally calculate sum of first and last digit i.e. sum = firstDigit + lastDigit .

Step-by-step explanation:

hope it helps you

plzz mark me as ur brainliast ❤️❤️

plzz follow me ❤️❤️❤️❤️

Answered by Anonymous
5

Answer:

  • Step by step description to find first digit of a number.

  • Input a number from user. Store it in some variable say num .

  • Copy the value of num to some temporary variable say first = num .

  • Divide first by 10 , till first >= 10 .

  • Finally you are left with first digit in first variable.
Similar questions