Advertisement
Guest User

baum

a guest
Feb 23rd, 2020
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.84 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. struct Knoten
  6. {
  7.     int data;
  8.     struct Knoten *links;
  9.     struct Knoten *rechts
  10.     };
  11.  
  12. void preorder(struct Knoten *r);
  13. void inorder(struct Knoten *r);
  14. void postorder(struct Knoten *r);
  15. struct Knoten *Insert(struct Knoten *root, int new_knoten_value);
  16.  
  17. int main()
  18. {
  19.     char number[10];
  20.     int a[]= {8,9,11,15,19,20,21,7,3,2,1,5,6,4,13,14,10,12,17,16,18};
  21.     int alength=21;
  22.     int i;
  23.     int j;
  24.     int zahl;
  25.     char *eptr=NULL;
  26.     int endeSize=4;
  27.     char endeString="ende";
  28.  
  29.  
  30.  
  31.     while(strlen(number)!= endeSize && strncmp(number,endeString,endeSize)!=0){
  32.         printf("Bitte geben Sie eine Zahl ein:");
  33.         gets(number);
  34.         zahl=strtol(number,&eptr,10);
  35.     }
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.     return EXIT_SUCCESS;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement