Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Programul primeste in date.in o expresie postfix ce contine cifre si semnele + - / % * ~ . Alte semne trebuie implementate (dar nu e greu).
  2. Un exemplu: 3 5 + 2 ~ * 7 + (programul va sterge in mod automat spatiile)
  3. Programul va folosi date.out si va afisa o interpretare a arborelui. Aceasta se intelege astfel: fiecare linie contine cate un nod, fiul stanga si fiul dreapta. Daca nu are fiul respectiv se va afisa "?". Ordinea afisarii nodurilor este de RSD.
  4. Un exemplu:
  5. + * 7
  6. * + ~
  7. + 3 5
  8. 3 ? ?
  9. 5 ? ?
  10. ~ ? 2
  11. 2 ? ?
  12. 7 ? ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement