Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int num;
- cin >> num;
- int firstDig = num % 10;
- int SecondDig = (num / 10) % 10;
- int thirdDig = (num / 100) % 10;
- for(int a = 1; a <= firstDig; a++){
- for(int b = 1; b <= SecondDig; b++){
- for(int c = 1; c <= thirdDig; c++){
- int result = a * b * c;
- cout << a << " * " << b << " * " << c << " = " << result << ";" << endl;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement