1. Write a program in C++ to enter any 3 digit number and find the product of the first and the last digit.
Answers
Answer:
Logic to find sum of first and last digit using loop
Logic to find sum of first and last digit using loopInput a number from user. ...
Logic to find sum of first and last digit using loopInput a number from user. ...To find last digit of given number we modulo divide the given number by 10 . ...
Logic to find sum of first and last digit using loopInput 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 .
Logic to find sum of first and last digit using loopInput 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 .