Hub Of Geekz

  • Home
  • About Me
  • Contact Us
  • Home
  • Languages
    • C++
    • Java
    • Perl
    • Prolog
    • Bootstrap
  • Database
    • SQL
    • PL/SQL
  • Study
    • Java
      • Java Collection
      • Java Concurrency
      • Java Interview Questions
      • Java Networking
    • Number System
  • Kavita
  • Entertainment
    • Hinglish Cafe
    • Videos
    • Jokes
  • Windows Tricks
  • How To

Sunday, 28 April 2013

Write a program in PL/SQL to print the following pattern * ** *** **** *****

 Earthcare Foundation NGO     22:43     PL/SQL     8 comments   


Experiment-12
Object: Write a program in PL/SQL to print the following pattern
*
**
***
****
*****

Requirements: Windows XP, Oracle 9i.

Program Code:
SQL>  declare
  2   i number(5);
  3   j number(5);
  4   begin
  5   for i in 1..5
  6   loop
  7   for j in 1..i
  8   loop
  9  dbms_output.put('*');
 10  end loop;
 11  dbms_output.new_line;
 12  end loop;
 13  end;
 14  .











Output:

SQL> /
*
**
***
****
*****

PL/SQL procedure successfully completed.













Result:Thus the above program in PL/SQL to print a pattern has been successfully executed.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

8 comments:

  1. Anonymous29 March 2014 at 03:49

    pattern for this
    a
    b b
    c c c
    d d d d
    e e e e e

    ReplyDelete
    Replies
    1. Unknown11 May 2014 at 23:41

      *****
      ****
      ***
      **
      *

      Delete
      Replies
        Reply
    2. Dhanashri Gajjar11 September 2015 at 01:58

      BEGIN
      FOR X IN 97.. &LAST LOOP
      DBMS_OUTPUT.PUT_LINE(' ');
      FOR Y IN 97..X LOOP
      DBMS_OUTPUT.PUT(CHR(X));
      -- DBMS_OUTPUT.PUT(CHR(Y));
      -- DBMS_OUTPUT.PUT('*');
      END LOOP;
      END LOOP;
      END;
      /

      Delete
      Replies
        Reply
    3. Dhanashri Gajjar11 September 2015 at 02:31

      ****
      ***
      **
      *
      BEGIN
      FOR X IN REVERSE 1.. &LAST LOOP
      DBMS_OUTPUT.PUT_LINE(' ');
      FOR Y IN 1..X-1 LOOP
      -- DBMS_OUTPUT.PUT(CHR(X));
      -- DBMS_OUTPUT.PUT(CHR(Y));
      DBMS_OUTPUT.PUT('*');
      END LOOP;
      END LOOP;
      END;
      /

      Delete
      Replies
        Reply
    4. Reply
  2. Unknown21 November 2017 at 02:58

    how to get
    2
    4 6
    8 10 12
    14 16 18 20
    22 24 26 28 30

    ReplyDelete
    Replies
    1. Anonymous23 November 2017 at 08:48

      DECLARE
      N NUMBER :=0;
      BEGIN
      FOR O IN 0..5
      LOOP
      FOR I IN 0..O
      LOOP
      N:=N+2;
      DBMS_OUTPUT.PUT(N||' ');
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('');
      END LOOP;
      END;
      /

      Delete
      Replies
        Reply
    2. Reply
  3. Unknown12 September 2018 at 13:57

    1
    22
    333
    4444
    55555

    ReplyDelete
    Replies
      Reply
  4. Unknown12 October 2020 at 05:55

    i need to programme was 1
    23
    345
    4567

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Ad


Jobsmag.inIndian Education BlogThingsGuide

Subscribe

Do you want fresh and hot updates about us? Then subscribe to our Feeds.

Total Pageviews

Popular Posts

  • Write a program in PL/SQL to print the factorial of a number.
    In this post I will explain how to get the factorial of any given number. For that first you need to know what is the procedure to find ...
  • To find the GCD of two numbers in PROLOG.
    gcd(X,Y):-X=Y,write('GCD of two numbers is '),write(X); X=0,write('GCD of two numbers is '),write(Y); Y=0,write('G...
  • Write a PL/SQL code to get the Fibonacci Sequence
    First, I will explain what is Fibonacci Sequence and how to get this series. So, Fibonacci Sequence is a series of numbers 0,1,1,2,3,5,8,1...

Label

All Articles Best Resources Blogging Boost Traffic Bootstrap C Plus Plus Collection Comedy Comedy Posts Comedy Videos Concurrency creative commons website Education Employee Entertainment Fibonacci Sequence free images GirlFriend Hinglish Cafe How To Image Websites Inspirational Java Java Interview Questions Java Networking Kavita Sangrah Life Lock Sreen Love Number System Patterns Perl Picture PL/SQL Plastic Engineering Programming Prolog public domain SEO Servlet Short Story Shortcut Keys Social Media Social Services SQL SuVichar Thread Traffic True Events Ultimate Guide Windows Tricks Windows8.1 WordPress

Blog Archive

  • ►  2020 (43)
    • ►  September (41)
    • ►  August (2)
  • ►  2019 (1)
    • ►  July (1)
  • ►  2018 (9)
    • ►  September (7)
    • ►  July (1)
    • ►  May (1)
  • ►  2017 (8)
    • ►  June (3)
    • ►  May (3)
    • ►  March (1)
    • ►  January (1)
  • ►  2016 (2)
    • ►  September (1)
    • ►  January (1)
  • ►  2015 (91)
    • ►  December (1)
    • ►  November (1)
    • ►  October (6)
    • ►  May (10)
    • ►  March (20)
    • ►  February (50)
    • ►  January (3)
  • ►  2014 (339)
    • ►  December (1)
    • ►  October (55)
    • ►  September (58)
    • ►  August (94)
    • ►  July (64)
    • ►  June (67)
  • ▼  2013 (34)
    • ►  August (5)
    • ▼  April (29)
      • Write a PL/SQL code to find the greatest number am...
      • Write a PL/SQL code to create and use process.
      • Write a PL/SQL code to get the Fibonacci Sequence
      • Write a PL/SQL code to implement after row trigger.
      • Write a PL/SQL code to calculate total sal of emp ...
      • Cursor in PL/SQL.
      • Write a program in PL/SQL to print the following p...
      • Write a program in PL/SQL to print the factorial o...
      • To calculate the areas of circles of given radius ...
      • To perform mathematical operation of two numbers u...
      • To perform the string function in simple database ...
      • To perform the numeric function in simple database...
      • To perform logical operations in simple database t...
      • To perform the group function in simple database T...
      • To create the simple relationship between two tabl...
      • To create a set of operation in simple database ta...
      • To alter table of a simple database using CREATE,A...
      • To create a database table using Create, Desc, Ins...
      • To write program in PROLOG to implement Tower in ...
      • To find the sum of given list in PROLOG
      • To create relations in PROLOG
      • To find the largest of three numbers in PROLOG.
      • To find the largest of three numbers in PROLOG.
      • To find the larger of two numbers in PROLOG.
      • To find the GCD of two numbers in PROLOG.
      • To find the factorial of given number in PROLOG.
      • To count the number of elements in a list in PROLOG.
      • To construct a binary tree in PROLOG
      • To perform arithmetic operations in PROLOG
  • ►  2012 (20)
    • ►  November (1)
    • ►  October (15)
    • ►  September (4)

Author

  • Earthcare Foundation NGO
  • Kavita house
  • Unknown
  • Unknown

Info

Copyright © Hub Of Geekz | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates