C++ Program to Find Diagonal of a Rectangle
Given two positive integers i.e, the length and breadth of the rectangle, the task is to find the length of the Diagonal of a Rectangle.
Input: length=4 breadth=3
output: The Diagonal is 5
The diagonal of a rectangle is sqrt (a*a+ b*b)
The Diagonal is 5
Time Complexity: O(1)
Auxiliary Space: O(1)
My Personal Notes arrow_drop_up
Please Login to comment...