#include
using namespace std;
int main()
{
int a, a1, a2, a3, b;
cout << "a = ", cin >> a, cout << "\n";<br> a1 = a / 100;
a2 = a / 10 % 10;
a3 = a % 10;
b = (a3+a2)*100 + (a2+2)*10;
cout << "b = " << b << "\n";<br> return 0;
}
Пример:
a = 123
b = 540