diff --git a/c/9.c b/c/9.c index b844375..1c9e55e 100644 --- a/c/9.c +++ b/c/9.c @@ -6,21 +6,22 @@ #include int main() { - int n, sum; - while (1) { + int n, sum; + + while(1) { scanf("%d", &n); - if (n > 0) { - sum = 0; - for (int i = 1; i <= n; i++) { - sum += i; + if(n > 0) { + sum = 0; + for(int i = 1; i <= n; i++) { + sum += i; } - printf("%d\n", sum); - break; + printf("%d\n", sum); + break; } else { - printf("X\n"); + printf("X\n"); } } - return 0; -} \ No newline at end of file + +} diff --git a/c/9.exe b/c/9.exe index 7f0bc6b..76fbab2 100644 Binary files a/c/9.exe and b/c/9.exe differ