From bc860aa8c5ad17b6a6d8d44e597a561047aa269e Mon Sep 17 00:00:00 2001 From: looosemycoool Date: Thu, 30 May 2024 13:56:38 +0900 Subject: [PATCH] 9.c --- c/9.c | 23 ++++++++++++----------- c/9.exe | Bin 40644 -> 41447 bytes 2 files changed, 12 insertions(+), 11 deletions(-) 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 7f0bc6b54482de2ad613b1b5fd2d5e0f99a89e87..76fbab2d9f399c7cbaf6360a1ac214b397db7e53 100644 GIT binary patch delta 6887 zcmcJTdsI|Mp2u%px}oLSycFftaJx}K5R3>SYWqSrF$Nz=jE}TNP?@xV*easZV2j!y zvGo@x#=%kJB;(AuSxq}L%*bSLAfg`Q64y;kB*sb1rW14rH^!LJN$hAoL_*I8!+cm5!aN$a!N)WCyLAWUdu@ELE2w8$4%-Z|LIB~~Y zdp}7RZz-uhpn&u&PMKW~wY@3vq^VH_D@H+24auTLmN9Y+p88#SA-g@Rs${uoxghk2 zXefp#AYC~jiWmoB}B95J*PZT-KN}@XlOT0 zZAv^*uNRJma)s$yMbk7j*SkK#qvB@SoOQ`rF=uu#$A`Ez#kwr09XX+Jd#le8_^Ti^ zby8ViYVcktSQE64l##SQaO&Wts9HJ;J8YKQ3CIJJBsgOa(4D|!^8v)-_}Pz6XR|3y zXl@(Mb9CxDL7O-D>!(q-`L1WJUp_bAa$C)Zq!`^tar3to4eb%zPocX9TRR-z!W2E7)P!%owMpm=7ZFM}%0limF@BzA`?BNA9O zHAg(f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