Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Programul primeste in date.in o expresie postfix ce contine cifre si semnele + - / % * ~ . Alte semne trebuie implementate (dar nu e greu).
- Un exemplu: 3 5 + 2 ~ * 7 + (programul va sterge in mod automat spatiile)
- 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.
- Un exemplu:
- + * 7
- * + ~
- + 3 5
- 3 ? ?
- 5 ? ?
- ~ ? 2
- 2 ? ?
- 7 ? ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement