Solved Problem #CPP#2049
Back
Problem Statement - Square and square root of numbers in a range
Write a c++ program to output the square and square roots of a number in a range where range begin variable is initialised in the variable ‘from’ and range end variable is initialised in the variable ‘to’.
Solution
Run Output
10x10 = 100 sqrt(10) = 3.16228
11x11 = 121 sqrt(11) = 3.31662
12x12 = 144 sqrt(12) = 3.4641
13x13 = 169 sqrt(13) = 3.60555
14x14 = 196 sqrt(14) = 3.74166
15x15 = 225 sqrt(15) = 3.87298
16x16 = 256 sqrt(16) = 4
17x17 = 289 sqrt(17) = 4.12311
18x18 = 324 sqrt(18) = 4.24264
19x19 = 361 sqrt(19) = 4.3589
20x20 = 400 sqrt(20) = 4.47214