From 0cba852f8755bf3f49f3716700f37e7252fe9d41 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Thu, 1 Apr 2021 15:17: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'du4/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ^^ --- du4/program.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index c2df95b..afbee1a 100644 --- a/du4/program.c +++ b/du4/program.c @@ -34,7 +34,12 @@ int main() { operation = 1; break; case '-': - operation = 2; + if(operation == 0) + operation = 2; + else{ + result[strlen(result)] = symbol; + result[strlen(result)] = '\0'; + } break; case '*': operation = 3;