Advertisement
Guest User

Untitled

a guest
Jul 25th, 2019
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. #include <string>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.  
  10.         int num;
  11.         cin >> num;
  12.  
  13.         int firstDig = num % 10;
  14.         int SecondDig = (num / 10) % 10;
  15.         int thirdDig = (num / 100) % 10;
  16.         for(int a  = 1; a <= firstDig; a++){
  17.             for(int b = 1; b <= SecondDig; b++){
  18.                 for(int c = 1; c <= thirdDig; c++){
  19.                   int result = a * b * c;
  20.                   cout << a << " * " << b << " * " << c << " = " << result << ";" << endl;
  21.                 }
  22.             }
  23.         }
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement