Prerequisite – PL/SQL introduction
In PL/SQL code groups of commands are arranged within a block. A block group related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Given three numbers and the task is to find out the sum and average of three numbers.
Input: a = 12, b = 15, c = 32 Output: sum = 59 avg = 19.66 Input: a = 34, b = 45, c = 11 Output: sum = 90 avg = 30
Approach is to take three numbers and find their sum and average using the formula given below-
Where a,b,c are the three numbers.
Below is the required implementation:
Sum = 46 Average = 15.33
- PLSQL | CHR Function
- PLSQL : || Operator
- PLSQL | ABS Function
- Difference between SQL and PLSQL
- PLSQL | RPAD Function
- PLSQL | RTRIM Function
- PLSQL | LENGTHC Function
- PLSQL | INSTR Function
- PLSQL | INSTR4 Function
- PLSQL | TRIM Function
- PLSQL | LTRIM Function
- PLSQL | LPAD Function
- PLSQL | INSTRC Function
- PLSQL | LENGTH4 Function
- PLSQL | INSTR2 Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.