#41526: c++


yp11351280@yphs.tp.edu.tw (710-43)

學校 : 臺北市私立延平高級中學
編號 : 276272
來源 : [203.72.178.1]
最後登入時間 :
2024-10-22 17:53:28
c418. Bert的三角形 (1) | From: [114.24.170.52] | 發表日期 : 2024-08-03 15:16

需使用雙重for。

  int a;
  cin>>a;
  for(int i=1;i<=a;i++){
    for(int j=1;j<=i;j++){
        cout<<"*";
    }
    cout<<endl;
  }

 
ZeroJudge Forum