manytimes-3

Untitled

Oct 29th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int num; cin >> num;
  7.  
  8.     int first = num / 100;
  9.     int second = num / 10 % 10;
  10.     int third = num % 10;
  11.  
  12.     for (int i = 1; i <= third; i++) {
  13.        for (int j = 1; j <= second; j++) {
  14.            for (int k = 1; k <= first; k++) {
  15.                 cout << i << " * " << j << " * " << k << " = " << (i * j * k) << ";" << endl;
  16.            }
  17.        }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment