diff --git a/cv3/program.c b/cv3/program.c index a099af5..f01429f 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -30,6 +30,11 @@ int main() { } if (line[0] == '+' || line[0] == '-' || line[0] == '*' || line[0] == '/') { input =+ 2; + if (a == 1){ + printf("no enough operands"); + vys = 1; + break; + } if (line[0] == '+') { number[a - 2].cislo = number[a - 2].cislo + number[a - 1].cislo; a--;