Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SpecialNumbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num = int.Parse(Console.ReadLine());
- int num1 = 0;
- int num2 = 0;
- int num3 = 0;
- int num4 = 0;
- for (num1 = 1; num1 <= 9; num1++)
- {
- for (num2 = 1; num2 <= 9; num2++)
- {
- for (num3 = 1; num3 <= 9; num3++)
- {
- for (num4 = 1; num4 <= 9; num4++)
- {
- if (num % num1 == 0 && num % num2 == 0 && num % num3 == 0 && num % num4 == 0)
- {
- Console.Write("{0}{1}{2}{3} ", num1, num2, num3, num4);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement