refresh
This commit is contained in:
		
							parent
							
								
									f618b06d70
								
							
						
					
					
						commit
						de6f6c6ad0
					
				
										
											Binary file not shown.
										
									
								
							@ -1,6 +1,7 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#define STACK_SIZE 10
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -10,7 +11,13 @@ struct stack {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void push_stack(struct stack* stack, float value) {
 | 
			
		||||
 | 
			
		||||
    if (stack->size >= STACK_SIZE) {
 | 
			
		||||
        printf("Error!\n");
 | 
			
		||||
        exit(1);
 | 
			
		||||
    }
 | 
			
		||||
    stack->values[stack->size] = value;
 | 
			
		||||
    stack->size++;
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
float pop_stack(struct stack* stack) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user