I've just started studying information technologies and I am currently stuck on a programming assignment.

I have to write a code in C which displays a cross to the console, the size of the cross being determined by an initial input.

So the console output should look like this:

```
size?: 5(user input)

xooox

oxoxo

ooxoo

oxoxo

xooox

```

(replace the os with blank space)

I've now come as far as this:

```
#include <stdio.h>

int main(void)
{
    int n;

    printf("size?: ");
    scanf("%d",&n);

    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)
        {
            if( (i==j) )
                printf("*");
            else 
                printf(" ");
        }
        printf("\n");
    }

    return 0;
}  

```

But this only displays one diagonal of the cross, I'm thinking that the opposite diagonal can be created by another condition after the if however I am lost as to what that condition might be.