int a, b;
cout << "Enter first digit:";
cin >> a;
cout << "Enter second digit:";
cin >> b;
int tmp_a = (a / 10) % 10;
int tmp_b = (b / 10) % 10;
cout << endl << "First digit "<< a % 10 + tmp_b * 10 + a / 100 * 100 <<endl;
cout << "Second digit " << b % 10 + tmp_a * 10 + b / 100 * 100 << endl;
system("pause");
cout << "Enter first digit:";
cin >> a;
cout << "Enter second digit:";
cin >> b;
int tmp_a = (a / 10) % 10;
int tmp_b = (b / 10) % 10;
cout << endl << "First digit "<< a % 10 + tmp_b * 10 + a / 100 * 100 <<endl;
cout << "Second digit " << b % 10 + tmp_a * 10 + b / 100 * 100 << endl;
system("pause");
Комментариев нет:
Отправить комментарий