Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace kontr
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.  
  13.             for (int x = 100; x < 1000; x++)
  14.             {
  15.            
  16.  
  17.                 if ((x / 100) * (x / 100) * (x / 100) + (x / 10 % 10) * (x / 10 % 10) * (x / 10 % 10) + (x % 10) * (x % 10) * (x % 10) == x)
  18.                 {
  19.                     Console.WriteLine("{0}", x);
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement