ajreuri23

שאלה 11

Oct 24th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1.  
  2.  
  3. int i, j, a;
  4. a = int.Parse(Console.ReadLine());
  5. for (i = 1; i < a; i++)
  6. {
  7. for (j = 1; j < a; j++)
  8. {
  9. if (Math.Pow(i, 2) + Math.Pow(j, 2) == a)
  10. Console.WriteLine(i + "," + j);
  11. }
  12. }
  13. Console.ReadLine();
Add Comment
Please, Sign In to add comment