Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace forDouble10SpecialNumbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int firstNumber = 0;
- int secondNumber = 0;
- int thurthNumber = 0;
- int fourthNumber = 0;
- int one = 0;
- int two = 0;
- int tree = 0;
- int four = 0;
- for (int first = 1; first <= n && first <= 9; first++)
- {
- if (n % first == 0)
- {
- firstNumber = first;
- }
- for (int second = 1; second <= n && second <= 9; second++)
- {
- if (n % second == 0)
- {
- secondNumber = second;
- }
- for (int thurth = 1; thurth <= n && thurth <=9; thurth++)
- {
- if (n % thurth == 0)
- {
- thurthNumber = thurth;
- }
- for (int fourth = 1; fourth <= n && fourth <= 9; fourth++)
- {
- if (n % fourth == 0)
- {
- fourthNumber = fourth;
- }
- if (firstNumber != one || secondNumber != two || thurthNumber != tree || fourthNumber != four)
- {
- Console.Write($" {firstNumber}{secondNumber}{thurthNumber}{fourthNumber}");
- one = firstNumber;
- two = secondNumber;
- tree = thurthNumber;
- four = fourthNumber;
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement