From fa52b8999f48911b3aa1efd4da5c51a386de66e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Sun, 28 Nov 2021 18:01:56 +0100 Subject: [PATCH] prvy --- a2/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a2/program.c b/a2/program.c index 412bdb5..53e6caa 100644 --- a/a2/program.c +++ b/a2/program.c @@ -126,10 +126,10 @@ int main(){ hej = 3; //puts("ahoj"); printf("Read: %s", r); - if (r[i] == '}'){printf("Unexpected closing bracket } in %d\n", i+1);} - else if (r[i] == ')'){printf("Unexpected closing bracket ) in %d\n", i+1);} - else if (r[i] == ']'){printf("Unexpected closing bracket ] in %d\n", i+1);} - else if (r[i] == '>'){printf("Unexpected closing bracket > in %d\n", i+1);} + if (r[i] == '}'){printf("Unexpected closing bracket } in %d\n", i);} + else if (r[i] == ')'){printf("Unexpected closing bracket ) in %d\n", i);} + else if (r[i] == ']'){printf("Unexpected closing bracket ] in %d\n", i);} + else if (r[i] == '>'){printf("Unexpected closing bracket > in %d\n", i);} i = n - 2; } i++;