|   |  | 
| ปรับปรุง : 2564-07-13 (ปรับแฟ้ม) | 
| datatype | TurboC | Programming | 
| // scanf, for, for<br>for ซ้อน for โดยควบคุมด้วยค่าที่รับจากแป้นพิมพ์(j)
/* http://www.thaiall.com/tc */
#include <stdio.h>
#include <conio.h>
void main()
{
  int i,j,max;
  scanf("%d",&max);
  for (i=1;i <= max; i++)
  {
    for (j=1;j <=i; j++)
    {
    printf("%d",j);
    }
    printf("\n");
  }
  getch();
} | 
| 
 | 
| "ไม่เริ่มต้นในวันนี้ จะไม่มีทางสำเร็จในวันพรุ่ง" โดย โยฮัน ว็อล์ฟกัง ฟ็อน เกอเทอ |