HOW TO FIND THE SUM OF FIRST AND LAST DIGIT OF A TWO DIGIT NUMBER IN TURBO C++
Answers
Answered by
4
Explanation:
#include <math.h>
{
int num, sum=0, firstDigit, lastDigit;
//Reading a number from user.
cout<<"Enter any number:";
cin>>num;
lastDigit = num % 10;
firstDigit = num;
Similar questions