Notification texts go here Contact Us Buy Now!

Find the area and perimeter of right triangle in PL/SQL

Find the area and perimeter of right triangle in PL/SQL
Estimated read time: 0 min
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated

Find the area and perimeter of right triangle in PL/SQL

Code

DECLARE
	-- declare variable side1, side2,
	-- base, height, area and perimeter
	-- and these six variable datatype
	-- are float
	hypotenuse	 FLOAT;
	base	 FLOAT;
	height FLOAT;
	area	 FLOAT;
	perimeter FLOAT;
BEGIN
	-- here we assign the value in
	-- side1, side2, base, height
	hypotenuse := 10;

	base := 4;

	height := 14;

	area := .5 * base * height;

	perimeter := hypotenuse + height + base;

	dbms_output.Put_line(' Area of triangle is '
						|| area);

	dbms_output.Put_line(' Perimeter of triangle is '
						|| perimeter);
END;
-- Program End

/

output

 Area of triangle is 28
 Perimeter of triangle is 28

Statement processed.
  

Getting Info...

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.