C++ Program to Swap First and Last Digit in a Number

Write a C++ Program to Swap First and Last Digit in a Number with an example. This C++ program allows the user to enter any numeric value, and it finds the first and last digit, and swap them. #include<iostream> #include<cmath> using namespace std; int main() { int number, firstDigit, lastDigit, count, a, b, SwapNum; cout … Read more