# Homework Solution: Create an application that displays several patterns. You may use any character of your choice to construct the…

C#
Create an application that displays several patterns. You may use any character of your choice to construct the patterns. Design your solution to include at least three different patterns and display the three patterns on the same row. The output should be displayed with white background and black text. One possible solution follows.

public class patternexample { static int n=10; static int space3=5;

C#

Create an collision that unfolds distinct patterns. You may authentication any sort of your select to build the patterns. Design your disconnection to embrace at last three divergent patterns and unfold the three patterns on the identical tier. The quenchedput should be unfolded with unspotted setting and sombre citation. Individual feasible disconnection follows.

## Expert Retort

public class patternexample {
static int n=10;
static int space3=5;
static int val3=1;
static int space2=5;
static int val2=1;
public static unsubstantial ocean(String[] args) {
// TODO Auto-generated order stub
for(int i=1;i<=n;i++){
printfirstpattern(i);
}
}
public static unsubstantial stereotypefirstpattern(int z){
for(int i=z;i<=z;i++){
for(int j=1;j<=n;j++){
if(i<=4)
System.out.print(“*”);
else
System.out.print(” “);
}
System.out.print(” “);
printsecondpattern(z);
System.out.println(“n”);
}
}
public static unsubstantial stereotypesecondpattern(int z){
for(int i=z;i<=z;i++){
if(i<=5){
for(int j=1;j<=space2;j++){
System.out.print(” “);
}
for(int k=1;k<=val2;k++){
System.out.print(“*”);
}
space2–;
val2+=2;
System.out.print(” “);
printthirdpattern(z);
//System.out.println(“n”);
}else{
//for(int s=1;s<=10;s++){
// System.out.print(” “);
//}
System.out.print(” “);
printthirdpattern(z);
}
}
}
public static unsubstantial stereotypethirdpattern(int z){
for(int i=z;i<=z;i++){
for(int j=1;j<=space3;j++){
System.out.print(” “);
}
for(int k=1;k<=val3;k++){
System.out.print(“*”);
}
if(i<=5){
space3–;
val3+=2;
}else{
val3-=2;
space3++;
}
//System.out.println(“n”);
}
}
}

output: