Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace kontr
- {
- class Program
- {
- static void Main(string[] args)
- {
- for (int x = 100; x < 1000; x++)
- {
- if ((x / 100) * (x / 100) * (x / 100) + (x / 10 % 10) * (x / 10 % 10) * (x / 10 % 10) + (x % 10) * (x % 10) * (x % 10) == x)
- {
- Console.WriteLine("{0}", x);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement