Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Write a program in C language, the function of which is to display a square consisting of asterisks in the left margin of the screen, and the side length of the square is specified by the plastic para
Write a program in C language, the function of which is to display a square consisting of asterisks in the left margin of the screen, and the side length of the square is specified by the plastic para
Write a program in C language, the function of which is to display a square consisting of asterisks in the left margin of the screen, and the side length of the square is specified by the plastic parameter side. /* Hello. Hello, world */

# contains "stdio.h"

# contains "conio.h"

# Define Total Count 36

int main(int argc,char * argv[])

{

int side = 0,I,j;

if(argc & gt; 2)

{

side = atoi(argv[ 1]);

}

if(side & lt; = 0)

{

Printf ("input:");

Scanf("%d ",& side);

}

if(side & lt; = 0)

Exit (0);

printf(" \ n ");

for(I = 0; I < side; i++)

{

for(j = 0; J< side; j++)

printf(" * ");

printf(" \ n ");

}

getch();

}