From 14c9578ef11050934b6e97b24766703d336907fe Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Tue, 6 Apr 2021 15:31:39 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du5/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/du5/program.c b/du5/program.c index 78f4884..54019f4 100644 --- a/du5/program.c +++ b/du5/program.c @@ -62,6 +62,7 @@ int main() { for(int i = 0; i < 100; i++) myEntries[i] = (struct entry*) calloc(1, sizeof(struct entry)); char inputs[100][50]; //input + strcpy(inputs[0], "('-_-)") int counter; //counter char symbol; //current symbol char* number1 = (char*) calloc(25, sizeof(char)); //temporary points @@ -107,7 +108,9 @@ int main() { if(!checked) myEntries[position] = createEntry(name, (int)strtol(number1, &ptr, 10)); } - + if(!strcmp(inputs[0], "('-_-)"){ + return 0; + } bsortDesc(myEntries, position+1); printf("Vysledky:\n"); for(int i = 0; myEntries[i]->name != NULL; i++) {