Write a C++ program to replace the first digit with the last digit of a 5 digit number , 2nd digit with the 4th digit of a 5 digit number and then store the new number in y and tell if the original number and the new numbers are same or not. (Assume there are no 0 in the number)
Expected Output:
Sample1:
Input 5 digit number: 23156
Original Number: 23156
New Number, y: 65132
Original Number and the New Number Doesn’t match.
Comments
Leave a comment