質問するログイン新規登録

回答編集履歴

1

微修正

2021/05/23 13:14

投稿

episteme
episteme

スコア16612

answer CHANGED
@@ -15,8 +15,7 @@
15
15
 
16
16
  for ( int i = 1; i < 6; ++i ) {
17
17
  printf("%d:", i);
18
- int count = hist[i-1];
18
+ for ( int count = hist[i-1]; count; --count ) {
19
- while ( count-- ) {
20
19
  printf("*");
21
20
  }
22
21
  printf("\n");