Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SAP
- {
- class SAP
- {
- static void Main(string[] args)
- {
- int a = 0;
- int b = 0;
- int c = 0;
- string str = "";
- for (int i = 1; i < 7; i++)
- {
- for (int j = 1; j < 7; j++)
- {
- for (int k = 1; k < 7; k++)
- {
- a = 49 * i + 8 * j; // decimal notation
- b = i + 56 * j; // decimal notation
- c = 7 * i + 50 * k; // decimal notation
- str = i.ToString() + j.ToString() + k.ToString();
- if (a - b == c && i > j)
- {
- Console.WriteLine("X = {0}", i);
- Console.WriteLine("Y = {0}", j);
- Console.WriteLine("Z = {0}", k);
- Console.WriteLine("XYZ = " + str);
- Console.WriteLine();
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement