Program to find the perimeter of the rectangleExplanationA rectangle has four sides in which sides opposite to each other are equal. The perimeter of the rectangle is the area around its outside. Suppose a, b, c, d are the four sides of rectangle. a=c and b=d Perimeter Of Rectangle= a+ b+ c+ d= a+ b+ a+ b= 2(a + b). Algorithm
ComplexityO(1) SolutionPythonOutput: Perimeter of Rectangle is: 12 COutput: Perimeter of Rectangle is: 18.00000 JAVAOutput: Perimeter of Rectangle is: 18.0 C#Output: Perimeter of Rectangle is: 18 PHPOutput: Perimeter of Rectangle is: 22 Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India