You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
p5fom6l7v 756109cbbb
Update README.md
4 years ago
README.md Update README.md 4 years ago

README.md

htu2

//打印菱形 #include<stdio.h> int main() { int n; scanf("%d",&n); int i,a,b; for(i=1;i<=n;i++) { for(a=n-1;a>=i;a--) { printf(" "); } for(b=1;b<=2i-1;b++) { printf(""); } printf("\n"); }

for(i=n-1;i>=1;i--)
{
	for(a=n-1;a>=i;a--)
	{
		printf(" ");
	}
	for(b=2*i-1;b>=1;b--)
	{
		printf("*");
	}
	printf("\n");
	}
	return 0;

}