My issue
what is hidden test case
My code
#include <stdio.h>
void xpattern(int N, int count) {
for (int i = 0; i < N; i++) {
for (int k = 0; k < count; k++) { // Repeat the "X" pattern `count` times
for (int j = 0; j < N; j++) {
if (i == j || i + j == N - 1) {
// Print '*' for both diagonals of the X
printf("*");
} else {
// Print space for non-diagonal positions
printf(" ");
}
}
printf(" "); // Space between each "X" in the horizontal row
}
printf("\n"); // Move to the next row after printing one row of all "X"s
}
}
int main() {
int N, count;
scanf("%d", &N);
count=N;
if(N%2==0)
printf("\n");
else
xpattern(N, count);
return 0;
}
Learning course: Algorithmic Problem Solving
Problem Link: https://www.codechef.com/learn/course/klu-problem-solving/KLUPS00A/problems/LPYAS165