Обновить cv3/program.c
This commit is contained in:
parent
8cfcf69563
commit
4206a797ab
@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define MAX_RAZMER 10
|
#define MAX_RAZMER 10
|
||||||
|
|
||||||
@ -94,6 +95,10 @@ int main() {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
double a = pop(&stek);
|
double a = pop(&stek);
|
||||||
|
if (b == 0) {
|
||||||
|
printf("division by zero\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
push(&stek, a / b);
|
push(&stek, a / b);
|
||||||
} else {
|
} else {
|
||||||
printf("no input\n");
|
printf("no input\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user