c++ for loop question!
Hi, I recently started for loop in C++ and I am stuck on a question. I'm hoping that someone will be able to help me with this.
Write a program which accepts as input a positive integer and checks, using the algorithm described below, to see whether or not the integer is divisible by 11. This particular test for divisibility by 11 was given in 1897 by Charles L. Dodgson (Lewis Carroll).
As long as the number being tested has more than two digits, form a new number by:
• deleting the units digit
• subtracting the deleted digit from the shortened number
The remaining number is divisible by 11 if and only if the original number is divisible by 11.
I have to use a FOR LOOP.