SHARE
TWEET

Untitled

a guest Feb 21st, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp6
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.Write("n=");
  10.             int n = int.Parse(Console.ReadLine());
  11.             for (int x = 1; x <= n; x++)
  12.             {
  13.                 for (int y = 1; y <= n; y++)
  14.                 {
  15.                     for (int z = 1; z <= n; z++)
  16.                     {
  17.                         if (x * x + y * y ==  Math.Pow(z,3))
  18.                             Console.WriteLine("{0}^2+{1}^2={2}^3", x, y, z);
  19.                     }
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top