var
s, s1, s2, s3, s4, tmp1, tmp2: string;
i, a, b, c, d, e, f: integer;
begin
Writeln('Введите строку: ');
Readln(s);
//
for var k := 1 to length(s) do
begin
if (s[k] = '(') then
begin
var j := k + 1;
while (s[j].IsDigit) do
begin
tmp1 := tmp1 + s[j];
j := j + 1;
end;
var ch := s[j];
j := j + 1;
while (s[j].IsDigit) do
begin
tmp2 := tmp2 + s[j];
j := j + 1;
end;
case ch of
'+': begin s := s.Remove(k - 1, j - k + 1); s := s.Insert(k - 1, inttostr(tmp1.ToInteger + tmp2.ToInteger)); end;
'-': begin s := s.Remove(k - 1, j - k + 1); s := s.Insert(k - 1, inttostr(tmp1.ToInteger - tmp2.ToInteger)); end;
'*': begin s := s.Remove(k - 1, j - k + 1); s := s.Insert(k - 1, inttostr(tmp1.ToInteger * tmp2.ToInteger)); end;
'/': begin s := s.Remove(k - 1, j - k + 1); s := s.Insert(k - 1, inttostr(tmp1.ToInteger div tmp2.ToInteger)); end;
end;
break;
end;
end;
//
for i := 1 to length(s) do
begin
if (s[i] = '+') or (s[i] = '-') or (s[i] = '*') or (s[i] = '/') then
begin
s1 := copy(s, 1, i - 1);
s2 := copy(s, i + 1, length(s));
c := i;
end;
end;
for i := 1 to length(s1) do
begin
if (s1[i] = '+') or (s1[i] = '-') or (s1[i] = '*') or (s1[i] = '/') then
begin
s3 := copy(s1, 1, i - 1);
s4 := copy(s1, i + 1, length(s1));
e := i;
end;
end;
Val(s3, a, d);
Val(s4, b, d);
Val(s2, f, d);
if (s[e] = '/') and (s[c] = '/') then Writeln((a div b) div f);
if (s[e] = '/') and (s[c] = '*') then Writeln((a div b) * f);
if (s[e] = '+') and (s[c] = '*') then Writeln(a + (b * f));
if (s[e] = '*') and (s[c] = '*') then Writeln(a * b * f);
if (s[e] = '+') and (s[c] = '/') then Writeln(a + (b div f));
if (s[e] = '*') and (s[c] = '+') then Writeln((a * b) + f);
if (s[e] = '/') and (s[c] = '+') then Writeln((a div b) + f);
if (s[e] = '*') and (s[c] = '/') then Writeln((a * b) div f);
if (s[e] = '+') and (s[c] = '+') then Writeln(a + b + f);
if (s[e] = '-') and (s[c] = '-') then Writeln(a - b - f);
if (s[e] = '+') and (s[c] = '-') then Writeln(a + b - f);
if (s[e] = '-') and (s[c] = '+') then Writeln(a - b + f);
if (s[e] = '*') and (s[c] = '-') then Writeln((a * b) - f);
if (s[e] = '/') and (s[c] = '-') then Writeln((a div b) - f);
if (s[e] = '-') and (s[c] = '*') then Writeln(a - (b * f));
if (s[e] = '-') and (s[c] = '/') then Writeln(a - (b div f));
end.
How can you see into my eyes like open doors?
Leadin' you down into my core
Where I've become so numb, without a soul
My spirit's sleeping somewhere cold
Until you find it there, and lead it back home
[Hook: Amy Lee & Paul McCoy]
Wake me up!
Wake me up inside!
I can't wake up
Wake me up inside!
Save me!
Call my name and save me from the dark
Wake me up!
Bid my blood to run
I can't wake up
Before I come undone
Save me!
Save me from the nothing I've become
[Verse 2: Amy Lee]
Now that I know what I'm without
You can't just leave me
Breathe into me and make me real
Bring me to life
[Hook: Amy Lee & Paul McCoy]
Wake me up!
Wake me up inside!
I can't wake up
Wake me up inside!
Save me!
Call my name and save me from the dark
Wake me up!
Bid my blood to run
I can't wake up
Before I come undone
Save me!
Save me from the nothing I've become
[Bridge: Amy Lee & Paul McCoy]
Bring me to life
I've been livin' a lie, there's nothing inside
Bring me to life
[Interlude: Amy Lee]
Frozen inside, without your touch
Without your love, darling
Only you are the life
Among the dead
[Verse 3: Paul McCoy & Amy Lee]
All this time, I can't believe I couldn't see
Kept in the dark, but you were there in front of me
I've been sleeping a thousand years it seems
Got to open my eyes to everything
Without a thought, without a voice, without a soul
Don't let me die here
There must be something more
Bring, me, to, life
[Hook: Amy Lee & Paul McCoy]
Wake me up!
Wake me up inside!
I can't wake up
Wake me up inside!
Save me!
Call my name and save me from the dark
Wake me up!
Bid my blood to run
I can't wake up
Before I come undone
Save me!
Save me from the nothing I've become
[Outro: Amy Lee & Paul McCoy]
Bring me to life
I've been living a lie, there's nothing inside
Bring me to life