0% found this document useful (0 votes)
19 views1 page

PLSQL

This document provides instructions for writing 3 PL/SQL blocks: 1) To compute the perimeter and area of a rectangle given user-defined length and width, displaying the output. 2) To declare an integer variable, assign a value, compute the variable, its square and cube, and insert into a temp table. 3) To convert between Fahrenheit and Celsius temperatures based on user input, displaying the output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

PLSQL

This document provides instructions for writing 3 PL/SQL blocks: 1) To compute the perimeter and area of a rectangle given user-defined length and width, displaying the output. 2) To declare an integer variable, assign a value, compute the variable, its square and cube, and insert into a temp table. 3) To convert between Fahrenheit and Celsius temperatures based on user input, displaying the output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a PL/SQL block that computes the perimeter and the area of a rectangle.

Define your own values for the length and width. (Assuming that L and W are the
length and width of the rectangle, Perimeter = 2*(L+W) and Area = L*W. Display the
output on the screen using dbms_output.put_line.

2. Write a PL/SQL block that declares an integer variable called num, assigns a value to
it, and computes and inserts into the tempp table the value of the variable itself, its
square, and its cube.

3. Write a PL/SQL block that converts a temperature in Fahrenheit (F) to its equivalent
in Celsius (C) and vice versa. The required formulae are:-
C= (F-32)*5/9
F= 9/5*C + 32
Display the output on the screen using dbms_output.put_line. Data has to be input
by the user.

You might also like