It saying my testcase are wrong but it showing right output

#include
using namespace std;

void hollowRhombus(int rows)

{
int i, j;
for (i=1; i<=rows; i++)
{
// Print trailing spaces
for (j=1; j<=rows - i; j++)
cout << " ";

    // Print stars after spaces 
    // Print stars for each solid rows 
    if (i==1 || i==rows) 
        for (j=1; j<=rows; j++) 
            cout << "*"; 
              
    // stars for hollow rows 
    else
        for (j=1; j<=rows; j++) 
            if (j==1 || j==rows) 
                cout << "*";   
            else
                cout << " "; 
    // Move to the next line/row 
    cout << "\n"; 
} 

}

// utility program to print all patterns
void printPattern(int rows)
{

cout << "\nHollow Rhombus:\n"; 
hollowRhombus(rows); 

}

// driver program
int main()
{
int rows = 5;
printPattern (rows);
return 0;
}

Hello @mayurpatil7208mp n can have any value upto 20.
so you to take n as input and you have to print for that n.
here you are doing for 5 only.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.