0% found this document useful (0 votes)
100 views6 pages

Assignment1 2 PL SQL

The document contains 103 programming problems covering a wide range of PL/SQL concepts like loops, conditional statements, functions, arrays, strings and more. The problems increase in complexity and cover topics such as printing patterns, finding factorials, checking prime numbers, calculating series, date/time operations and employee data processing.

Uploaded by

Riya thakkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views6 pages

Assignment1 2 PL SQL

The document contains 103 programming problems covering a wide range of PL/SQL concepts like loops, conditional statements, functions, arrays, strings and more. The problems increase in complexity and cover topics such as printing patterns, finding factorials, checking prime numbers, calculating series, date/time operations and employee data processing.

Uploaded by

Riya thakkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

PL/SQL PROGRAMMING

1. Write a program to print the following format.


2. Write a program to print the numbers from 1 to 100.
3. Write a program to print the even numbers from 1 to 100.
4. Write a program to print the odd numbers from 1 to 100
5. Write a program for multiplication table
6. Write a program to find the sum of numbers from 1 to 100
7. Write a program to find the sum of all odd numbers from 1 to 100
8. Write a program to find the sum of all even numbers from 1 to 100
9. Write a program to accept a number and find how many digits it contain
10. Write a program to accept a number and find the sum of the digits
11. Write a program to accept a number and print it in reverse order
12. Write a program to accept a no and check whether it is Armstrong number or not
13. Write a porgram to generate all the Armstrong numbers from 1 to 1000
14. Write a program to generate all prime numbers between 1 to 100
15. Write a program to aceept a number and check whether it is prime number or not
16. Write a program to display the fibonacci series from 1 to 10
17. Write a program to aceept a number and print it in binary format
18. Write a program to accept a number and find the factorial of the number
19. Find the factorials of numbers from 1 to 10
20. Write a program to aceept a number and display it in the Octal format
21. Write a program to accept a number and print the multiplication tables upto soo
22. Write a program to accept the temp in Centigrade and convert it into Fahrenheit(c=F-32/1.8)
23. Write a program to calculate the area of a triangle by accepting the 3 sides
24. Write a program to calculate the area of a circle by accepting the radius and unit of measure
25. Write a program to calculate the perimeter of a circle(perimeter=2*PI*r)
26. Write a program to accept the 3 sides of the triangle and display the type of triangle
27. Write a program accept the value of A,B&C display which is greater
28. Write a program accept a string and check whether it is palindrome or not
29. Write a program aceepts the value of A,B and swap the nos and print the values
30. Write a program to accept the values of A , B and swap the numbers and print the values without using
third variable
31. Write a program to accept the side of a square and calculate the area area =a2
32. Write a program to accept principle amount ,rate,time calculate the simple interest si=(p*t*r)/100
33. Write a program to aceept the principle amount,rate,time and find the compound interest
34. WAP to calculate the sum of 1!+2!+......+n!
35. WAP to calculate the sum of 1+1/2+1/3+......+1/n
36. WAP to calculate the sum of 1/1!+1/2!+.....+1/n!
37. WAP to calculate the sum of 1/1!+2/2!+......+n/n!
38. Write a program to display the months between two dates of a year
39. Write a program to accept the date and print the weekdays from the given date
40. WAP to accept the date and print the weekdays from the given date along with date format
41. Write a program to accept a year and check whether it is leap year or not
42. Write a program to accept a year and display all sundays along with the date
43. WAP to accept a string and count how many vowels present in the string
44. Write a program to accept a year and check whether it is leap year or not . If it is leap year then
display how many sundays present in that year
45. Write a program to accept a char and check it is vowel or consonant
46. WAP to accept A,B,C & D check whether it is Ramanujan number or not
47. WAP to accept the CMR & LMR & find out the total bill amount
i)0-100 units Rs.50 per unit
ii)101-200n units Rs.o.25 per unit
iii)>200 units Rs.1.25 per unit
48. WAP or accept marks of 3 subject as i/p and calculate the total marks and division of a student
i) If totmark>=60 then division is First
ii) If totmark <60 and totmark>=50 then division is second
iii) If totmark< 50 and >=35 then division is third
iv) If totmark< 35 then fail
49. WAP to accept a number and print its multiplication table horinzontally
50. WAP to accept a string and print it in reverse order
51. Write a program to accept a number and find out the sum of first and last digits
52. WAP to accept the basic salary and find out the ta,da,hra,lic and gs
i)ta 20% of basic, da 10% of basic, hra 30% of basic, lic 5% of basic
53. WAP to accept the length and breadth of a rectangle and find out the perimeter
54. WAP to accept the cost price and selling price of an item and find the loss or profit
55. Writ a program to generate the following series
56. WAP to accept a no in binary format and print it in decimal format
57. WAP to accept two nos and input and find one no is raised to another one (without using any function)
58. WAP to accept a sentence and count the no of chars in that sentence
59. WAP to accept two strings and display the large one among those
60. WAP to display all the nos whose sum of digits is 9 from 1 to 9999
61. WAP to accept a no and find the sum in a single digit
62. Enter the no of days and find out the no of years and no of days and months
63. WAP to accept the date and print all the weekdays along with the given date
64. WAP while purchasing certain items,discount of each is as follows
i) If qty purchased > 1000 discount is 20%
ii) If the qty and price per item are i/p then calculate the expenditure
65. Write a program to accept a string and count the no of individual chars
66. Write a program to display all combination of 1,2,&3
67. Write a program to find out the series 12+22+32+42+....++n2
68. Write a program to accep the time in HH & MIN format and find the total senconds
69. WAP to accept the distance between two cities in km and convert into mts ,cm & ft
70. Write a program to find the series x+x2/2!+x3/3!+.....+xn/n!
71. Write a program to accept the population of hyderabad each year the population increases 2% after 4y
what is the population of hydredabad.
72. WAP to accept the 3 dates and display the most recently month among 3 dates
73. Accept a string and print in the following format
O
OR
ORA
ORAC
ORACL
ORACLE
74. Write a program to accept the annual income of the emp and find the income tax
i) If the annsal > 60000 then tax is 10% of income
ii) If the annsal > 100000 then tax is Rs 800+16% of income
iii) If the annsal > 140000 then tax is Rs 2500+25% of income
75. WAP to accept a year as i/p & find how many even number present in that year
76. WAP to accept a year as i/p & find how many odd number present in that year
77. WAP to accept a number and calculate the sum of numbers in even places
78. WAP to accept the emp details and calculate the bonus based on the following conditions
i) If sal < 500 then bonus is 10% sal
ii) If sal > 3500 then bonus is 12% sal
iii) If sal > 1000 then bonus is 13.5% sal
79. WAP to accept the empno and display ename,sal,hiredate and calculate ta,da,hra,lic,gross,exp and print
all emp details. ta is 30% of sal,da is 20% of sal,hra is 15% of sal,lic is 5% of sal
80. WAP to accept the item no ,item name,qty,unit price and calculate the bill
If the bill > 500 then give discount 2% of bill amount and display the details
81. Write a program to generate sequence of numbers horizontally from 1 to 25
82. WAP to accept a empno and display empno,name,sal,exp,dname,grade and loc.
83. WAP to accept a empno and display empno,based on experience calculate the bonus and store it into the
bonus table
If exp > 5 years then bonus is 1 month salary
If exp between 5 and 9 years then bonus is 20% of annual salary
If exp more than 9 years then bonus is 1 month sal plus 25% of annual salary
84. WAP to accept the empno, based upon the dname transfer the emps ie, make the changes in the emp
table. Transfer the emps from Accounting dept to Research, Research dept to Operation, Opertion
dept to Sales and Sales to Accounting dept
85. WAP to accept the empno and display all the details of emp. If emp doesnot exist display the appreciate
message
86. WAP to accept the empno and print all the details of emp,dept and salgrade
87. WAP to accept the mgrno and display the empno,ename,sal,dname and grade of all emps working under
that mgr 88.WAP to accept the empno and display the exp with minimum 3 decimal places
89.Write a program to print the following series
1
12
123
1234
12345

90. Write a program to print the following series


1
21
321
4321
54321
91. Write a program to print the following series
12345
1234
123
12
1

92. Write a program to print the following series


11111
22222
33333
44444
55555

93. Write a program to print the following series


12345
12345
12345
12345
12345

94. Write a program to print the following series


54321
5432
543
54
5

95. Write a program to print the following series


55555
4444
333
22
1
96. Write a program to print the following series
1
22
333
4444
55555
97. Write a program to print the following series
1
01
101
0101
10101

98. Write a program to print the following series


*
**
***
****
*****
99. Write a program to print the following series
*
**
***
****
*****
******

100. Write a program to print the following series


12345
2345
345
45
5

101. Write a program to print the following series


54321
4321
321
21
1

102. WAP to accept 2 nos and find the sum and product of the nos and print the output
103. WAP to accept 2 nos and find the remainder when the first number is divided by sencond(dont use
mod function)
104. WAP to display all the ASCII characters 0-9--48-57,A-Z--65-90,a-z--97-122
105. Print the following format
ORACLE
ORACL
ORAC
ORA
OR
O
106. WAP to display "GOOD MORNING" or "GOOD AFTERNOON" or "GOOD NIGHT" depending
upon the current time
107. WAP to accept two strings and concat the two strings
108. WAP to accept a string and count the no of chars,words in that string
109. WAP to accept the octal number and print it in decimal format
110. WAP to accept the mgr and find how many emps are working under that mgr
111. WAP to accept the empno and update the employee row on the following
If sal < 2600 then sal=sal+10% of sal make the changes in the emp table
112. Write the floyd's triangle
1
23
456
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
...............
79..............91
113. WAP to accept the real value and print integer value only
114. WAP to calculate the sum of n odd factorials
115. WAP to calculate the sum of n even factorials
116. WAP to generate the nos which are prime and odd between 1 and 100
117. Write a program to generate following series
12
12 22
12 22 32
12 22 32 42
12 22 32 42 52
118. Find the roots of a quadratic equation
119. WAP to accept the 2 diff nos, assume that first one is smaller and second one is highest value then print
the all even nos in between them horizontally
120. WAP to accept two diff nos assume that first one is smaller and second one is highest value then print
the all odd nos in between them horizontally

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy