Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit Pattern19 #19

Closed
ErSKS opened this issue Jul 27, 2017 · 24 comments
Closed

Submit Pattern19 #19

ErSKS opened this issue Jul 27, 2017 · 24 comments

Comments

@ErSKS
Copy link
Owner

ErSKS commented Jul 27, 2017

pattern19

@pujanchangubhari73
Copy link

package forpattern28;

/**
*

@author Pujan
*/
public class ForPattern28 {

/**

@param args the command line arguments
*/
public static void main(String[] args) {
char[] b = {'N', 'E', 'P', 'A', 'L'};

for (int i = 0; i <= b.length; i++) {

for (int a = 0; a <= i; a++) {

 System.out.printf(" ");

}
for (int j = i; j <= 4; j++) {

 System.out.print(b[j]);

}
System.out.printf("\n");
}
}

}

capture

@jagdish4249
Copy link

package pattern16;

/**
*

  • @author jagdish
    */
    public class Pattern16 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here

      char[] country = {'N','E','P','A','L'};
      int l = country.length;
      for ( int i = l; i >= 1; i--) {
      int z = l-i;
      for ( int j = l; j >= 1 ; j--) {

           if(i<j){
               System.out.print(" ");   
           }  
           else{
               System.out.print(country[z]);
                 z++;
           }   
       }
      

      System.out.println("");
      }
      }

}

image

@raBbn
Copy link

raBbn commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern19;

/**
*

  • @author Kishorr
    */
    public class Pattern19 {

    /**
    *

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] arr = {'N', 'E', 'P', 'A', 'L'};
      char[] arr1 = {'A', 'B', 'C', 'D'};
      for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5; j++) {
      if (j < i) {
      System.out.print(" ");
      } else {
      System.out.print(arr[j] + " ");
      }
      }

       System.out.println("");
      

      }
      capture16

    }

}

@milan604
Copy link

package pattern16;

/**
*

  • @author m-lan
    */
    public class Pattern16 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char a[] = {'N', 'E', 'P', 'A', 'L'};
      int b = 0;
      for (int i = 1; i <= a.length; i++) {
      for (int j = 1; j <= i; j++) {
      System.out.printf(" ");
      }
      int c = b;
      for (int k = a.length; k >= i; k--) {
      System.out.printf("%c", a[c]);
      c++;

       }
       b ++;
       System.out.println("");
      

      }

    }

}
screenshot from 2017-07-27 15-06-23

@sthaanu
Copy link

sthaanu commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern19;

/**
*

  • @author admin
    */
    public class Pattern19 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < a.length; j++) {
      if (j >= i) {
      System.out.print(a[j]);
      } else {
      System.out.print(" ");
      }
      }
      System.out.println("");
      }
      }

}
capture

@kiir33
Copy link

kiir33 commented Jul 27, 2017

System.out.println("Pattern 19\n----------------------");
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
if (j < i) {
System.out.print("\t");
} else {
System.out.print(nep[j] + "\t");
}
}

        System.out.println("");
    }

Output:
capture

@karmi214
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern19;

/**
*

  • @author Anish
    */
    public class Pattern19 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] v = {'N', 'E', 'P', 'A', 'L', 'I'};
      for (int i = 0; i < v.length; i++) {
      for (int j = 0; j < v.length; j++) {
      if (j >= i) {
      System.out.print(v[j]);
      } else {
      System.out.print(" ");
      }
      }
      System.out.println("");
      }

    }

}
p19

@kajalmaharjan
Copy link

//PATTERN 20
char[] n4 = {'N', 'E', 'P', 'A', 'L'};
for (int i = 0; i < n4.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = i; k < n4.length; k++) {
System.out.print(n4[k]);
}
System.out.println("");
}
image

@ghost
Copy link

ghost commented Jul 27, 2017

package pattern22;

/**
*

  • @author Samikshya
    */
    public class Pattern22 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char n[] = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < 5; i++) {
      for (int j = 0; j < i; j++) {
      System.out.print(" ");

       }
       for (int k = i; k < 5; k++) {
           System.out.print(n[k]);
      
       }
       System.out.println("");
      

      }

    }
    }
    capture

@syslin
Copy link

syslin commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package paterrn;

/**
*

  • @author dell
    */
    public class Paterrn {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] a = {'N', 'E', 'P', 'A', 'L'};
      System.out.println("pattern 20");
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < a.length; j++) {
      if (j >= i) {
      System.out.print(a[j]);
      } else {
      System.out.print(" ");
      }
      }
      System.out.println(" ");

      }

    }
    }
    output
    20

@RakenShahi
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package q17;

/**
*

  • @author DELL
    */
    public class Q17 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      int b = 5;

      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i <= 4; i++) {

       for (int k = 0; k < i; k++) {
           System.out.printf(" ");
       }
      
       for (int j = i; j < b; j++) {
      
           System.out.printf("%c", a[j]);
      
       }
      
       System.out.print("\n");
      

      }

    }

}

OUTPUT
17

@Roshantwanabasu
Copy link

Code:
/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern19;

/**
*

  • @author NiiRosh
    */
    public class Pattern19 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] nep = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < nep.length; i++) {
      for (int j = 0; j < nep.length; j++) {
      if (j < i) {
      System.out.print(" ");
      } else {
      System.out.print(nep[j]);
      }
      }

       System.out.println("");
      

      }
      }

}

Output:
pattern19

@leoprabin10
Copy link

    System.out.println("\n\n\n");
    for (int i = 0; i < n.length; i++) {
        for (int j = 1; j < i + 1; j++) {
            System.out.print("  ");
        }

        for (int k = 1; k <= n.length - i; k++) {

            System.out.print(n[k - 1] + " ");
        }

        System.out.println();
    }

// TODO code application logic here
}
p16

@rabina12
Copy link

  • @author Albina Praz
    */
    public class P16 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here

      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < a.length; j++) {
      if (j >= i) {
      System.out.print(a[j]);
      } else {
      System.out.print(" ");
      }
      }
      System.out.println("");
      }
      }
      }
      pt16

@rivab
Copy link

rivab commented Jul 27, 2017

char[] a = {'E', 'A', 'R', 'T', 'H', 'Q', 'U', 'A', 'K', 'E'};
System.out.println("Output of Q.No.20");
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = 0; k < a.length - i; k++) {
System.out.print(a[k + i]);
}
System.out.println(" ");
}

20

@ghost
Copy link

ghost commented Jul 29, 2017

package patternten9;

/**
*

  • @author User
    */
    public class PatternTen9 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < a.length; j++) {
      if (j >= i) {
      System.out.print(a[j]);
      }
      else {
      System.out.print(" ");
      }
      }
      System.out.println(" ");
      }
      }
      }
      patt19

@Sudan15423
Copy link

for (int i = 0; i <= a.length - 1; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(" ");
}
for (int j = i; j <= a.length - 1; j++) {
System.out.print(a[j]);
}
System.out.println();
}
}
Output:
19

@ajay987
Copy link

ajay987 commented Jul 29, 2017

char[] a = {'N', 'E', 'P', 'A', 'L'};
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = i; k < a.length; k++) {

            System.out.print(a[k]);
        }
        System.out.println();
    }

patt19sol

@rituratnam
Copy link

CODE:
package patternnepal;

/**
*

  • @author Lavalesh
    */
    public class PatternNepal {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < i; j++) {
      System.out.print(" ");
      }
      for (int k = 0; k < a.length - i; k++) {
      System.out.print(a[k + i]);
      }
      System.out.println(" ");
      }
      }
      }
      Output:
      pattern19

@duwalshraddha
Copy link

Code
package pattern17;

/**
*

  • @author Lenovo
    */
    public class Pattern17 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] x = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i <= x.length - 1; i++) {
      for (int j = 1; j <= i; j++) {
      System.out.print(" ");
      }
      for (int j = i; j <= x.length - 1; j++) {
      System.out.print(x[j]);
      }
      System.out.println();
      }
      }
      }
      18

@Rajjushrestha
Copy link

public static void main(String[] args) {
char a[] = {'N', 'E', 'P', 'A', 'L'};
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = i; k < a.length; k++) {
System.out.print(a[k]);
}

        System.out.print("\n");
    }

19

@sarumdr
Copy link

sarumdr commented Jul 29, 2017

/**
*

@author sarumdr
*/
public class Pattern19 {

/**

@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] v = {'N', 'E', 'P', 'A', 'L', 'I'};
for (int i = 0; i < v.length; i++) {
for (int j = 0; j < v.length; j++) {
if (j >= i) {
System.out.print(v[j]);
} else {
System.out.print(" ");
}
}
System.out.println("");
}
}

}

OUTPUT
image

@SusanCB
Copy link

SusanCB commented Jul 29, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pat17;

/**
*

  • @author nissus
    */
    public class Pat17 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      char[] a = {'N', 'E', 'P', 'A', 'L'};

      for (int i = 0; i <= a.length; i++) {
      for (int j = 0; j <= i; j++) {
      System.out.print(" ");
      }
      for (int j = i; j < a.length; j++) {
      System.out.print(a[j]);
      }
      System.out.println(" ");
      }
      // TODO code application logic here
      }

}
pat17

@sanzeevtamang
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package patternp;

/**
*

  • @author Eev
    */
    public class PatternP {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      char[] a = {'N', 'E', 'P', 'A', 'L'};
      for (int i = 0; i < a.length; i++) {
      for (int j = 0; j < a.length; j++) {
      if (j >= i) {
      System.out.print(a[j]);
      } else {
      System.out.print(" ");
      }
      }
      System.out.println(" ");

      }
      }

}

image

@ErSKS ErSKS closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests