Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
1462 张曦元 打印星号三角形 C++ Accepted 100 0 MS 252 KB 309 2019-10-10 19:52:12

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: