Question: Take 6 numbers from the user for 3 triangles (a, b) sides and store them in 1D array. Make function Pythagoras () which calculate the
Take 6 numbers from the user for 3 triangles (a, b) sides and store them in 1D array. Make function Pythagoras () which calculate the c side for the 3 triangles. Test case: Input: 1 1 2 2 3 3 Output: C for Triangle 1 = 1, C for Triangle 2 = 8, C for Triangle 3 = 18 Ex) In triangle 1 rightarrow c= a^2 + b^2 = 1^2 + 1^2 = 1 In triangle 2 rightarrow c = a^2 + b^2 = 2^2 + 2^2 = 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
