#include <stdio.h>
main()
{ char a[4][4];
int row,col;
for (row=0;row<4;row=row+2)
{
for (col=0;col<4;col++)
{
if ((row==col)||(row!=col))
{
a[row][col]='x';
}
}
}
for (row=0;row<4;row=row+2)
{
for (col=0;col<4;col++)
{
printf ("%c",a[row][col);
}
}
}
Nomi55 -3 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
Nomi55 commented: wanted to print a shape like that in row 1 and 3 there are 4 astericks... +0
Gonbe 32 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.