메뉴 건너뛰기

Programing

C언어 게시판

while문 사용하기

관리자2 2018.12.17 19:34 조회 수 : 163

#include <stdio.h>

 

int main() {

  int a;

scanf("%d",&a);

int i=1;

  while(i!=10) {

printf("%d X %d = %d\n", a, i, a*i);

i++;

  }

 

  return 0;

}

while문은 while(조건값)구조로 되어있다. 쉽게 (조건 까지 반복하기)라고 볼수 있다.

위로