Comments (25)
package pattern18;
/**
*
-
@author m-lan
*/
public class Pattern18 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
char[] a = {'A', 'B', 'C', 'D'};
int b = 0;
for (int i = 1; i <= a.length; i++) {
for (int j = 2; 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++; for (int l = a.length; l > i; l--) { System.out.printf("%c", a[l - 2]); } System.out.println("");
}
}
-
}
from java.
package pattern17;
/**
*
-
@author jagdish
*/
public class Pattern17 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A','B','C','D'};int l = a.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(a[z]); z++; } } z = l-2; for (int k = 1; k <= l-1; k++) { if((i-1)>=k){ System.out.print(a[z]); z--; } }
System.out.println("");
}
}
-
}
from java.
/*
- 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[] arr1 = {'A', 'B', 'C', 'D'};for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (j < i) {
System.out.print(" ");
} else {
System.out.print(arr1[j] + " ");
}
}
for (int j = 2; j >= i; j--) {
System.out.print(arr1[j] + " ");
}
System.out.println("");
}
}
-
from java.
package forpattern29;
/**
*
-
@author Pujan
*/
public class ForPattern29 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D'};
int n = 3; //same to array lengthfor (int i = 0; i <= a.length - 1; i++) {
for (int l = 0; l <= i; l++) { System.out.printf(" " + " "); } for (int j = i; j <= n; j++) { System.out.print(a[j] + " "); } for (int k = n - 1; k >= i; k--) { System.out.print(a[k] + " "); } System.out.println();
}
}
-
}
from java.
/*
- 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 pattern;
/**
*
-
@author mahesh
*/
public class Pattern {/**
- @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] alpha = {'A', 'B', 'C', 'D', 'E'};
final int N = alpha.length;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (j < i) {
System.out.print(" ");
} else {
System.out.print(alpha[j]);
}
}
for (int j = N - 2; j >= i; j--) {
System.out.print(alpha[j]);
}
System.out.println("");
}
System.out.println();
}
- @param args the command line arguments
from java.
/*
- 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 pattern20;
/**
*
-
@author admin
*/
public class Pattern20 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
char[] a = {'A', 'B', 'C', 'D'};
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(" ");
}
}
for (int j = a.length - 2; j >= 0; j--) {
if (j >= i) {
System.out.print(a[j]);
} else {
System.out.print(" ");
}} System.out.println("");
-
from java.
package pattern8;
/**
*
-
@author KIRANN
*/
public class Pattern8 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D', 'E'};
int i, j;
final int N = 5System.out.println("Pattern 20\n----------------------");
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
if (j < i) {
System.out.print("\t");
} else {
System.out.print(a[j] + "\t");
}
}
for (j = N - 2; j >= i; j--) {
System.out.print(a[j] + "\t");
}
System.out.println("");
}
-
from java.
/*
- 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 pattern20;
/**
*
-
@author Anish
*/
public class Pattern20 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D'};
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(" ");
}
}
for (int j = a.length - 2; j >= 0; j--) {
if (j >= i) {
System.out.print(a[j]);
} else {
System.out.print(" ");
}} System.out.println("");
}
}
-
from java.
/*
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 assignment2;
/*
*
@author LORDsajan
*/
public class Assignment2 {
/**
@param args the command line arguments
/
public static void main(String[] args) {
System.out.println("\nPattern 20");
char[] ch = {'A', 'B', 'C', 'D'};
for (int i = 0; i < ch.length; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(" ");
}
for (int j = i; j < ch.length; j++) {
System.out.print(ch[j]);
}
for (int k = ch.length - 2; k >= i; k--) {
System.out.print(ch[k]);
}
System.out.println(" ");
}
from java.
package pattern21;
/**
*
-
@author Samikshya
*/
public class Pattern21 {public static void main(String[] args) {
char n[] = {'A', 'B', 'C', 'D'};
for (int i = 0; i < 4; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");} for (int k = i; k < 4; k++) { System.out.print(n[k]); } for (int k = 2; k >= i; k--) { System.out.print(n[k]); } System.out.println(""); }
}
}
from java.
//PATTERN 21
char[] n5 = {'A', 'B', 'C', 'D'};
for (int i = 0; i < n5.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int j = i; j < n5.length; j++) {
System.out.print(n5[j]);
}
for (int j = 2; j >= i; j--) {
System.out.print(n5[j]);
}
System.out.println("");
}
from java.
/*
- 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
System.out.println("pattern 21");
char b[] = {'A', 'B', 'C', 'D'};
for (int i = 0; i < b.length; i++) {
for (int j = 0; j < b.length; j++) {
if (j >= i) {
System.out.print(b[j]);
} else {
System.out.print(" ");} } for (int k = b.length - 2; k >= 0; k--) { if (k >= i) { System.out.print(b[k]); } else { System.out.print(""); } } System.out.println(" ");
-
from java.
/*
- 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 q18;
/**
*
-
@author DELL
*/
public class Q18 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {int b = 4;
int c = 0;char[] a = {'A', 'B', 'C', 'D'};
for (int i = 0; i <= 3; i++) {for (int k = 0; k < i; k++) { System.out.printf(" "); } for (int j = i; j < b; j++) { System.out.printf("%c", a[j]); } for (int l = 2; l >= c; l--) { System.out.printf("%c", a[l]); } c = c + 1; System.out.print("\n");
}
}
-
}
from java.
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 letterdiamond;
/**
*
-
@author NiiRosh
*/
public class Letterdiamond {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D'};for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
if (j < i) {
System.out.print(" ");
} else {
System.out.print(a[j]);
}
}
for (int j = a.length - 2; j >= i; j--) {
System.out.print(a[j]);
}
System.out.println("");
}
}
-
}
from java.
public static void main(String[] args) {
char[] a = {'A', 'B', 'C', 'D'};
for (int i = 0; i < 5 - 1; i++) {
for (int j = 0; j < 5 - 1; j++) {
if (j < i) {
System.out.print(" ");
} else {
System.out.print(a[j] + " ");
}
}
for (int j = 5 - 3; j >= i; j--) {
System.out.print(a[j] + " ");
}
System.out.println();
}
from java.
char[] a = {'A', 'B', 'C', 'D'};
for (inti = 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(" ");
}
}
for (int j = a.length - 2; j >= 0; j--) {
if (j >= i) {
System.out.print(a[j]);
} else {
System.out.print(" ");
}
}
from java.
System.out.println("Output of Q.No.21");
char[] b = {'A', 'B', 'C', 'D'};
for (int i = 0; i < b.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = 0; k < b.length - i; k++) {
System.out.print(b[k + i]);
}
for (int l = 1; l < b.length - i; l++) {
System.out.print(b[b.length - 1 - l]);
}
System.out.println(" ");
}
from java.
/*
- 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 day4;
/**
*
-
@author dragon15423
*/
public class Day4 {/**
- @param args the command line arguments
*/
public static void main(String[] args) {
for (int i = 0; i <= b.length - 1; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(" ");
}
for (int j = i; j <= b.length - 1; j++) {
System.out.print(b[j]);
}
for (int j = b.length - 2; j >= i; j--) {
System.out.print(b[j]);
}
System.out.println();
}
}
Output:
- @param args the command line arguments
from java.
char[] b = {'A', 'B', 'C', 'D', 'C', 'B', 'A'};
for (int i = 0; i < b.length; i++) {
if (i == 0) {
for (int j = 0; j < b.length; j++) {
System.out.print(b[j]);
}
} else {
for (int l = 0; l < i; l++) {
System.out.print(" ");
}
for (int k = i; k < b.length - i; k++) {
System.out.print(b[k]);
}
}
System.out.println();
}
from java.
package patterntwenty;
/**
*
-
@author User
*/
public class PatternTwenty {/**
- @param args the command line arguments
*/
public static void main(String[] args) {
char[] a = {'A', 'B', 'C', 'D'};
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
if (j < i) {
System.out.print(" ");
}
else {
System.out.print(a[j]);
}
}
for (int k = a.length - 2; k >= i; k--) {
System.out.print(a[k]);
}
System.out.println(" ");
}
}
}
- @param args the command line arguments
from java.
CODE:
package pattern20;
/**
*
-
@author Lavalesh
*/
public class Pattern20 {/**
- @param args the command line arguments
*/
public static void main(String[] args) {
char[] b = {'A', 'B', 'C', 'D'};
for (int i = 0; i < b.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
for (int k = 0; k < b.length - i; k++) {
System.out.print(b[k + i]);
}
for (int l = 1; l < b.length - i; l++) {
System.out.print(b[b.length - 1 - l]);
}
System.out.println(" ");
}
}
}
Output:
- @param args the command line arguments
from java.
Code
package pattern18;
/**
*
-
@author Lenovo
*/
public class Pattern18 {/**
- @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D'};
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]);
}
for (int j = 2; j >= i; j--) {
System.out.print(a[j]);
}
System.out.println("");
}
}
- @param args the command line arguments
from java.
/*
- 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 pat18;
/**
*
-
@author nissus
*/
public class Pat18 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {char[] ch = {'A', 'B', 'C', 'D'};
for (int i = 0; i < ch.length; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(" ");
}
for (int j = i; j < ch.length; j++) {
System.out.print(ch[j]);} for (int k = ch.length - 2; k >= i; k--) { System.out.print(ch[k]); } System.out.println(" ");
}
}
// TODO code application logic here
}
-
from java.
public class Pattern20 {
/**
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
char[] a = {'A', 'B', 'C', 'D', 'E'};
int i, j;
int N = 5
for (i = 0; i < N; i++) {
for (j = 0; j < N; j++) {
if (j < i) {
System.out.print("\t");
} else {
System.out.print(a[j] + "\t");
}
}
for (j = N - 2; j >= i; j--) {
System.out.print(a[j] + "\t");
}
System.out.println("");
}
}
}
from java.
//pattern 20
char[] b = {'A', 'B', 'C', 'D'};
for (int i = 0; i < b.length; i++) {
for (int j = 0; j < b.length; j++) {
if (j >= i) {
System.out.print(b[j]);
} else {
System.out.print(" ");
}
}
for (int j = b.length - 2; j >= 0; j--) {
if (j >= i) {
System.out.print(b[j]);
} else {
System.out.print(" ");
}
}
from java.
Related Issues (20)
- Initial Design - CGPA Calculator HOT 1
- Initial Design - Blood Bank HOT 1
- Initial Design - CMS HOT 1
- Initial Design - RMS HOT 1
- Initial Design - SMS HOT 1
- Initial Design - FDC HOT 1
- Initial Design - HRS HOT 1
- Initial Design - DSMS HOT 1
- Some Screenshots - SRP HOT 1
- Some Screenshots - KLMS HOT 1
- Submit - Login UI HOT 6
- Build UI Better HOT 3
- Submit - Initial Screenshots, Source Code & Database HOT 4
- Submit - Concept Work of Your Project
- Design & Develop a Simple Calculator HOT 9
- Develop - PIN Breaker HOT 3
- Refresh JTable HOT 3
- Splash Screen - Loading
- Submit your Project Title HOT 26
- Project Submission Deadline: 31st Ashoj, 2017 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java.