Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #ifndef DEBUG
- #define DEBUG(...) printf(__VA_ARGS__)
- #endif
- typedef struct ZnakovniNiz{
- char array[5000];
- }niz;
- typedef struct Node{
- struct Node *next;
- int val;
- } node;
- void push(node **top, int val) {
- node *novi;
- novi = malloc(sizeof(node));
- if(!novi) return;
- novi->val = val;
- novi->next = *top;
- *top = novi;
- }
- void pop(node **top) {
- node *t;
- if(!(*top)) return;
- t = (*top)->next;
- free(*top);
- *top = t;
- }
- int main() {
- node *top = NULL;
- niz zagrade[500];
- int n;
- scanf("%d", &n);
- for(int i = 0; i < n; i++){
- scanf("%s", zagrade[i].array);
- }
- for(int i = 0; i < n; i++){
- printf("%s\n", zagrade[i].array);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement