From ec2b15a2178d11d57383ebf0bd758fd63a9e9475 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Thu, 17 Mar 2022 16:35:56 +0100 Subject: [PATCH] SAD --- du3/program | Bin 5196 -> 5294 bytes du3/program.c | 29 ++++++++++++----------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/du3/program b/du3/program index 8ff69e679888f37160455e65b2b6c9379b141a8a..865dc0909f6a6f65a440afac927149c10aaa633e 100755 GIT binary patch delta 2008 zcmZ8iZA_b06h80E`<9lrltLLGa}-(_`@tBSUy+yr*68BmKKRgNQO7b!NtR6wNKA+f z3r13j;9Z>i;gZE48iTq7%rKJJ+0H>^Nj19ggCESXq+~2%nTRoLug|%+U5Gb%d(Lyt zJzw{ndplSC&5lvOUhNpGIQD45M#P^?xsXy}knn4wtpJ|5EnvrTX>A_@5uw_>bNYA8LNlkZqVc9BJY^ty$YE9C|=o5H)(p ze5>nZccIpTl4ve#u7^jciz!H5BVMQ#&DyBhuXq@gE+Mx zvEi>#xx|-QB~RRjX-x`0k$-Hx`n~uRybv;7YaPB7St-711X*b%XXB$I-BmQjs3s-W zvv%}L#c!;btYWLv&#;7g3Z$t$)rU|&n=I32@5MVuFU+BbaJ?-Pqwrx2)*#06J1|-9 z#t&5i#tz0+c`nB}~zoQc#Ze2)-HdnXOjq z5Z7!)`x9s_-!VTvOgSNAD#Ew)o?&Nx0Te|NPi{e)B9~L+kR#Dke9>1y&jX9P>^(Xq zCpxk}(&2v1QD(CEyeP>Dm~1dE8o{y41_%mJd$&w+!Zk8 z(}6to3m!{yUb!t36y`|aXsca=`L;+VV2Y`|%p z6eI4lja(b5$5SH-afJ#yn8>437#+vrY87@$Y>1BB+I}unNilj@T&}|WIH-40VQvSS zgt8Upwy5SR%gh&x8G^o9z9t`2u(;UA;dK%pKm_<^YKkhFF$Ctz9$1!0!^D7aKP)x2-W|Imhp=lAbxdiM3*J9mi}3rfY?1=s%rY$^@^ delta 1868 zcmZ8iZA@EL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/du3/program.c b/du3/program.c index 1c8898c..e514d07 100644 --- a/du3/program.c +++ b/du3/program.c @@ -1,25 +1,20 @@ #include int main(){ - int c; + int c, result; + int value = 0; int vxod[999]; - for(int i = 0; i < 2; i++){ - scanf("%d", &c); - if(c == 4) - break; + int a = 0; + for(int i = 0; i < 4; i++){ + c = scanf("%d",&value);; vxod[i] = c; + a = i; } - if(c == 4) - printf("Vysledok je: 57.00\n"); - else if(vxod[0] == 2 && vxod[1] == 1) - printf("Vysledok je: 3.00\n"); - else if(vxod[0] == 2 && vxod[1] == 2) - printf("Vysledok je: 6.00\n"); - else if(vxod[0] == 12) - printf("Vysledok je: 1719.00\n"); - else if(vxod[0] == 7) - printf("Vysledok je: 1893.00\n"); - else if(vxod[0] == 1) - printf("Vysledok je: 9.00\n"); + value = 0; + do{ + result = vxod[0] * vxod[value] + 1; + value++; + }while(value < a); + printf("%d\n", result); return 0; }