Sara and pattern (Functional Problem)
Easy
Time Limit: 2 sec
Memory Limit: 128000 kB
Memory Limit: 128000 kB
Problem Statement
Sara loves patterns, today she encounters an interesting pattern and wants to write a code that can print the pattern of a given height N. As Sara is weak in programming help her to code it.
static void Pattern(int N){
//Enter your code here
for(int row=0;row<N;row++){
int num = row*6;
for(int col=0;col<N;col++){
System.out.print(num+" ");
num+=4;
}
System.out.println();
}
}