CP Tutorial Solutions
CP Tutorial Solutions
Q1. Draw the flowchart to Read 3 numbers (A, B, C) and check whether the input numbers are
Pythagorean Triplets. Output “TRUE” if they are Pythagorean Triplets, else output “FALSE”. A, B, C
are Pythagorean Triplets, if A2 + B2 = C2.
Eg. A=3, B=4 and C=5, then 32 + 42 = 9 + 16 = 25 = 52, So the answer is “TRUE”.
3+2𝑎
Q2. Draw the flowchart for to compute the sum of series given by the ∑𝑛𝑎=0 −1𝑎 2𝑎
1
Q3. Draw a flowchart to reverse a number
***END***
2