Java Pattern Programs

  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1   2   3   4   5
    6   7   8   9
    10 11 12
    13 14
    15

    View Answer

    45 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    15 14 13 12 11
    10 9 8 7
    6 5 4
    3 2
    1

    View Answer

    63 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1
    1 0
    1 0 1
    1 0 1 0
    1 0 1 0 1

    View Answer

    65 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    5 5 5 5 5
       4 4 4 4
          3 3 3
             2 2
                1

    View Answer

    40 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    1 2 3 4 5
    2 2 3 4 5
    3 3 3 4 5
    4 4 4 4 5
    5 5 5 5 5

    View Answer

    42 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern for n number of rows (take n as input from user):

    Enter number of rows: 5
    abcdedcba
    abcdedc
    abcde
    abc
    a

    View Answer

    14 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    A
    AB
    ABC
    ABCD
    ABCDE

    View Answer

    27 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

        A
       AB
      ABC
     ABCD
    ABCDE
    

    View Answer

    18 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    Exam
     xam
      am
       m
    

    View Answer

    19 Likes


  • Java Nested for Loops

    Write a program in Java to display the following pattern:

    bo
    tt
    le
    s
    


Showing 21 - 30 of 87 Questions