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;
- for (int num1 = 1; num1 <= 9; num1++) {
- for (int num2 = 1; num2 <= 9; num2++) {
- for (int num3 = 1; num3 <= 9; num3++) {
- for (int num4 = 1; num4 <= 9; num4++) {
- if (num % num1 == 0 && num % num2 == 0 && num % num3 == 0 && num % num4 == 0)
- {
- cout << num1 << num2 << num3 << num4 << " ";
- }
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement