1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include <iostream> using namespace std; int main() { int A, B = 0; while (1) { cin >> A >> B; if (A >=100 && B >= 100 && A < 1000 && B < 1000) break; } cout << A*(B%10) << endl; cout << A*((B%100)–(B%10))/10 << endl; cout << A*(B–(B%100))/100 << endl; cout << A*B << endl; } | cs |