Search Results

Search found 1 results on 1 pages for 'gogolo'.

Page 1/1 | 1 

  • Pythagoras triangle

    - by Gogolo
    I would like to ask you about this programing part, is it everything ok? the task was: Write the pseudocode or flow diagram and code for the theorem of Pythagoras - for right-angle triangle with three ribs (a, b, and c) of type integer int KendiA = 0; int KendiB = 0; int H = 0; string Trekendeshi = null; int gjetja = 0; for (KendiA = 1; KendiA <= 15; KendiA++) { for (KendiB = 1; KendiB <= 15; KendiB++) { for (H = 1; H <= 30; H++) { if ((Math.Pow(KendiA, 2) + Math.Pow(KendiB, 2) == Math.Pow(H, 2))) { gjetja = gjetja + 1; Trekendeshi = gjetja + "\t" + KendiA + "\t" + KendiB + "\t" + H; Console.WriteLine(Trekendeshi); } } } }

    Read the article

1