Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Project Euler Problem 9
//Rextester.Program.Main is the entry point for your code. Don't change it //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int a, b, c, sum = 1000; for (a=1; a <= sum-2; a++) { for (b=a+1; a+b <= sum-1; b++) { c = sum - (a+b); if (a*a + b*b == c*c) { Console.WriteLine("{0}, {1}, {2}, {3}", a, b, c, a*b*c); } } } } } }
run
|
edit
|
history
|
help
0
1
Date Conversion
toplam
10857
Daimone
3D Array
R
database exterior 0.1
asxs
sdcsvdfcsc