Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5.
- enum Symbol { Stała, Operator }
- 6.
- struct Wyrażenie
- {
- public Symbol rodzaj;
- public string wartość;
- }
- 7.
- Wyrażenie[] w = new Wyrażenie[wejscie.Length];
- for(int i = 0; i < wejscie.Length; ++i)
- {
- string str = wejscie[i];
- w[i].wartość = str;
- if (str.Equals("+") || str.Equals("-"))
- w[i].rodzaj = Symbol.Operator;
- else
- w[i].rodzaj = Symbol.Stała;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement