Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
46393 | 杨中琦 | 打印星号三角形 | C++ | Accepted | 100 | 0 MS | 256 KB | 252 | 2022-07-13 12:57:54 |
#include<iostream> int main(){ int a,i=1; scanf("%d",&a); while(i<=a){ int m=1; while(m<=a-i){ printf(" "); m++; } int n=1; while(n<=2*i-1){ printf("*"); n++; } printf("\n"); i++; } return 0; }