Sunday, 12 January 2020

HAY THANK FOR VISIT

Question:-write a program to print the pattern given below:-
                  
                5 4 3 2 1
                5 4 3 2
                        5 4 3
                5 4 
                5
              
                 class Pat2
                   {
                      void main()
                        {
                              for(int i=5;i>=1;i--)
                                 {
                                      for(int j=5;j>=i;j--)
                                        System.out.printl(j);
                                     System.out.println();
                                  }
                            }
                    }
                     

Thanks for visit Keep Supporting.

No comments:

Post a Comment

HAY THAKYOU FOE VISIT

Program(python):-Find duplicates in an array (Geeks for geek problem)

QUESTION:- Given an array  a  of size  N  which contains elements from  0  to  N-1 , you need to find all the elements occurring more than o...