0% found this document useful (0 votes)
2 views

EXPERIMENT 9(Basic Plsql Operators)[1]

The document outlines a series of exercises focused on PL/SQL basics and operators. Each exercise requires writing a PL/SQL block to perform specific calculations or display outputs, such as calculating areas, perimeters, total costs, and converting temperatures. The exercises are designed to enhance understanding of variable usage, user input, and basic arithmetic operations in PL/SQL.

Uploaded by

KESHAV ABHISHEK
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)
2 views

EXPERIMENT 9(Basic Plsql Operators)[1]

The document outlines a series of exercises focused on PL/SQL basics and operators. Each exercise requires writing a PL/SQL block to perform specific calculations or display outputs, such as calculating areas, perimeters, total costs, and converting temperatures. The exercises are designed to enhance understanding of variable usage, user input, and basic arithmetic operations in PL/SQL.

Uploaded by

KESHAV ABHISHEK
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/ 4

EXPERIMENT -9

(PL/SQL Basics and Operators)

Exercise 1: Write a PL/SQL block to calculate the area of a rectangle using


variables and basic operators. Assume the length and widths of the rectangle are
given.

Exercise 2: Write a PL/SQL block to calculate the perimeter of a square using user
input. Assume the length of the square is given by the user.

Exercise 3: Write a PL/SQL block to calculate the total cost of purchasing a


certain quantity of items. Assume the price per item and the quantity are given.
Exercise 4: Write a PL/SQL block to calculate the area of a triangle using the
formula: area = (base * height) / 2. Assume the base and height of the triangle are
given.

Exercise 5: Write a PL/SQL block to calculate the percentage of marks obtained


by a student out of the total marks. Assume the marks obtained and the total marks
are given.

Exercise 6: Write a PL/SQL block to display "Hello, World!" using


DBMS_OUTPUT.PUT_LINE.

Exercise 7: Write a PL/SQL block to declare a variable x and assign it the value
10. Then, display the value of x.
Exercise 8: Write a PL/SQL block to calculate the sum of two numbers (e.g., 5
and 7) and display the result.

Exercise 9: Write a PL/SQL block to find the maximum of three numbers (e.g.,
10, 25, and 15) and display the result.

Exercise 10: Write a PL/SQL block to calculate the area of a rectangle using the
length and width provided by the user.
Exercise 11: Write a PL/SQL block to convert temperature from Celsius to
Fahrenheit. Assume the temperature in Celsius is provided by the user.

Exercise 12: Write a PL/SQL block to calculate the simple interest for a loan.
Assume principal amount, rate of interest, and time period are provided by the
user.

You might also like