1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <stdio.h> int main(void) { int i = 5; int factorial = 1; while (i >= 1) // i¸¦ °¨¼Ò½ÃÅ°¸é¼ i°¡ 1ÀÌ»óÀÌ¸é ¹Ýº¹ÇÑ´Ù. { factorial *= i; i--; } printf("%d \n", factorial); return 0; } | cs |