Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
1514 张弛 打印星号三角形 C++ Accepted 100 0 MS 264 KB 309 2019-10-12 21:01:50

Tests(4/4):


#include<iostream> int main(){ int a,i=1; scanf("%d",&a); while(i<=a){ // 打空格的个数a-i int m=1; while(m<=a-i){ printf(" "); m++; } // 打*的个数2*i-1 int n=1; while(n<=2*i-1){ printf("*"); n++; } printf("\n"); i++; } return 0; }


Judgement Protocol: