Update cv3/program.c

This commit is contained in:
Marat Izmailov 2024-10-17 11:53:56 +00:00
parent 2bcce5a191
commit 5ff3758ff4

View File

@ -33,7 +33,7 @@ float pop_stack(struct stack* s) {
void print_stack(struct stack* s) { void print_stack(struct stack* s) {
for (int i = 0; i < s->size; i++) { for (int i = 0; i < s->size; i++) {
printf("%.2f ", s->values[i]); printf("%.2f ", s->values[i]);
} }
printf("\n"); printf("\n");
} }
@ -46,7 +46,8 @@ int main() {
int has_input = 0; int has_input = 0;
while (1) { while (1) {
printf("Zadajte číslo alebo operáciu (+, -, *, /): ");
if (!fgets(input, sizeof(input), stdin)) { if (!fgets(input, sizeof(input), stdin)) {
break; break;
} }