Computer Science, asked by catchsarth, 6 hours ago

HOW TO FIND THE SUM OF FIRST AND LAST DIGIT OF A TWO DIGIT NUMBER IN TURBO C++

Answers

Answered by llElegantlavenderll
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