/* 29graph.c グラフを表示してみる */ #include <stdio.h> int main(void) { int graph[] = {8, 30, 20, 5, 12, 999}; int i, j; for(i=0; graph[i] != 999; i++){ /*999以外のとき繰り返す */ printf("%2d\t", graph[i]); for(j=0; j<graph[i]; j++){ printf("●"); } printf("\n"); } return 0; }
29graph.c
![](https://torisky.xsrv.jp/code/wp-content/themes/cocoon-master/screenshot.jpg)
コメント