Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int num;
- cin >> num;
- for (int i = 1; i <= (num % 10); i++) {
- for (int j = 1; j <= ((num / 10) % 10); j++) {
- for (int k = 1; k <= (num / 100); k++) {
- cout << i << " * " << j << " * " << k << " = " << i * j * k << ";\n";
- }
- }
- }
- return 0;
- }
- Или:
- #include <iostream>
- using namespace std;
- int main() {
- string num;
- cin >> num;
- for (int i = 1; i < num[0] - 47; i++) {
- for (int j = 1; j < num[1] - 47; j++) {
- for (int k = 1; k < num[2] - 47; k++) {
- cout << i << " * " << j << " * " << k << " = " << i * j * k << ";\n";
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement