[Question]
  [
Your task is to take a list of arguments that are either integers or operators, and parse them like so:
1. There is a current operator, which starts as +.
2. Each time an operator is found, the current operator will change to it.
3. The possible operators are: "+", "-", "\*", "/", and "%", which correspond to their meanings in C and most languages.
4. There is a running solution kept, which starts at 0.
5. Each time an integer is found, the solution is modified by the number depending on the operator; e.g. if the operator is "/" then the solution is divided by the number.
6. If an operation would result in a mixed number (i.e. with a decimal) then it must be floored back to an integer (i.e. the decimal must be chopped off).
7. Output the final solution.
For example:
The arguments `5 8 25 * 9 6 2 - 104 / 4 7 + 6 % 14` would result in:
```
  5 8  25 * 9   6    2    - 104  / 4    7      + 6 % 14
0 5 13 38   342 2052 4104   4000   1000 142   148    8  -> 8
```
The inputs will be as command-line or function arguments, or an equivalent for your language.
Shortest code wins!
  
[Answer]
# JavaScript (ES6) 53
A function taking an array as input.
Run the snippet in Firefox to test.
```
f=a=>a.map(t=>t<'0'?o=t:v=eval(v+o+t)|0,v=0,o='+')&&v
// TEST
out=x=>O.innerHTML=x;
input = [5,8,25,"*",9,6,2,"-",104,"/",4,7,"+",6,"%",14];
out(input.join(' ')+' -> '+f(input));
function go() {
  i=I.value.split(/ +/),out(I.value+' -> '+f(i))
}  
```
```
<pre id=O></pre>
Your test:<input id=I><button onclick='go()'>GO</button>
```
[Answer]
# Pyth - ~~24~~ ~~23~~ ~~22~~ 20 bytes
*2 bytes saved thanks to @issacg and 1 thanks to @orlp!*
Uses reduce with base case of `0` and checks for `'` being in repr to detect string vs. int.
```
u.xsv++GbH&=bHG+\+QZ
```
Does not work online because I use full eval which is disabled online for security reasons. Takes input from stdin in a list as such: `5, 8, 25, "*", 9, 6, 2, "-", 104, "/", 4, 7, "+", 6`.
[Answer]
# Julia, ~~85~~ 83 bytes
```
s->(o=0;p="+";for i=split(s) isdigit(i)?o=eval(parse("ifloor($o$p$i)")):(p=i)end;o)
```
This creates an unnamed function that accepts a string as input and returns an integer.
Ungolfed:
```
function f(s::String)
    # Assign the starting output value o and operator p
    o = 0
    p = "+"
    # Split the input string into an array on spaces
    for i = split(s)
        if isdigit(i)
            # Assign o using string interpolation
            o = eval(parse("ifloor($o $p $i)"))
        else
            # Assign p to the new operator
            p = i
        end
    end
end
```
Fixed issue and saved 2 bytes thanks to Glen O.
[Answer]
# elisp, 101 bytes
With the arguments passed as a quoted list: e.g. `(c '(5 5 * 10))`
```
    (defun c(a)(let((f 0)(o '+))(dolist(x a)(if(not(integerp x))(setf o x)(setq f (eval(list o f x)))))f))
```
Version with new lines:
```
    (defun c (a)
      (let ((f 0)
            (o '+))
        (dolist (x a)
          (if (not (integerp x))
              (setf o x) 
            (setq f (eval (list o f x)))))
        f))
```
[Answer]
# CJam, 24 bytes
```
0'+ea+{_A,s&O{:O;}?S}%s~
```
This is a full program that reads the input as command-line arguments.
To try the code online in the [CJam interpreter](http://cjam.aditsu.net/#code=0'%2BlS%2F%2B%7B_A%2Cs%26O%7B%3AO%3B%7D%3FS%7D%25s~&input=5%208%2025%20*%209%206%202%20-%20104%20%2F%204%207%20%2B%206%20%25%2014) (which doesn't support command-line arguments), replace `ea` with `lS/` to read from simulated STDIN.
### How it works
```
0'+                       Push a 0 and the character '+'.
   ea                     Push the array of command-line arguments.
     +                    Prepend the character to the array.
      {             }%    For each element:
       _                    Push a copy.
        A,s                 Push "0123456789".
           &                Intersect the copy with the string of digits.
             {   }?         If the intersection is non-empty:
            O                 The element is a number. Push O.
              :O;             The element is an operator. Save it in O.
                   S        Push a space.
                      s~  Flatten the array of strings and evaluate it.
```
[Answer]
# JavaScript, 85 bytes
```
r=0;o="+";prompt().split(" ").forEach(t=>+t+1?r=parseInt(eval(r+o+ +t)):o=t);alert(r)
```
[Answer]
# Lua, 142 bytes
```
function f(s)o="+"r=0 for c in s:gmatch"%S+" do if tonumber(c)~=nil then loadstring("r=r"..o..c)() else o=c end r=math.floor(r)end print(r)end
```
Ungolfed:
```
function f(s)
    o="+" --original operator
    r=0 --return value
    for c in s:gmatch"%S+" do --split by spaces
        if tonumber(c)~=nil then --check if the current character is a number
            loadstring("r=r"..o..c)() --appends the current operator and current character ex "r=r+5" and then evaluates as another Lua script 
        else 
            o=c --if the character is not a number, it is the new operator
        end
        r=math.floor(r) --floor after each operation
    end 
    print(r) --print the result
end
```
[Answer]
# Powershell, 57 bytes
```
$o="+"
$args|%{$r=iex "$r$o$_"
if(!$?){$o=$_}$r-=$r%1}
$r
```
ungolfed;
```
$operator="+"
$args | ForEach-Object
{
    $result = Invoke-Expression "$result $operator $_"
    if(!$?)
    {
        $operator=$_
    }
    $result -= $result % 1
}
$result
```
If the implicit variable in the for-each is an operator rather than number, Invoke-Expression (POSH's `eval()`) will fail and the execution status `$?` will be false.
Floor in POSH is unwieldy - `$foo=[math]::floor($foo)` and `$foo-=$foo%1` was the golfiest alternative I could think of. 
[Answer]
# GNU Sed (with the eval extension, + dc), 102
(Score includes +1 for the -r option to sed.)
```
s/.*/0 + &p/
s/([-+/*%]) ([0-9]+)/\2 \1/g
:
s/([-+/*%] )([0-9]+ )([0-9]+)/\1\2\1\3/
t
s/.*/dc<<<'&'/e
```
Transforms the input expression to reverse polish notation, and then uses `dc` to evaluate it.
### Test output:
```
$ sed -rf calclist.sed <<< '5 8 25 * 9 6 2 - 104 / 4 7 + 6 % 14'
8
$ 
```
[Answer]
# CJam, 34 bytes
```
'+0lS/{"+-*/%"1$#){@;\}{i2$~}?}/\;
```
[Try it online](http://cjam.aditsu.net/#code='%2B0lS%2F%7B%22%2B-*%2F%25%221%24%23)%7B%40%3B%5C%7D%7Bi2%24~%7D%3F%7D%2F%5C%3B&input=5%208%2025%20*%209%206%202%20-%20104%20%2F%204%207%20%2B%206%20%25%2014)
I thought this was going to be fairly reasonable. But I wasn't fast enough posting it to be the shortest CJam answer at least for a moment. :(
[Answer]
## Python 3 - ~~131 bytes~~ ~~129 bytes~~ ~~121 bytes~~ 116 Bytes
Thanks to Maltysen for shaving off two bytes, Beta Decay for shaving off 8, and Steven Rumbalski for shaving off 5.
```
def f(x):
    a,b="+",0
    for i in x:
        if i in"+-*/%":a=i
        else:b=int(eval(str(b)+a+i))
    return b
```
I'm trying to figure out a way to reduce the length of the if statement, but for now this seems about as golfed as I can get it. Takes input as a list. 
[Answer]
# Bash, 69
```
set -f
for t in $*
do
((1${t}1>2))&&((r${o-+}=$t))||o=$t
done
echo $r
```
This only works with non-negative integers - its not clear in the question if this is ok or not.
[Answer]
# Groovy, 79 bytes
```
def f(x,a=0,b='+'){x.each{z->a=z=~/\d/?Eval.me(a+b+z)as int:a;b=z=~/\d/?b:z};a}
```
Demo:
```
groovy> f([5,8,25,'*',9,6,2,'-',104,'/',4,7,'+',6,'%', 14])
Result: 8
```
Ungolfed:
```
def f(x, a=0, b='+') {                                   
    x.each {z->
        a = z =~ /\d/ ? Eval.me(a+b+z) as int : a
        b = z =~ /\d/ ? b : z
    }
    a
}
```
[Answer]
# Perl 5.10+, 52 bytes
```
perl -E '$o="+";/\D/?$o=$_:eval"\$x=int\$x$o$_"for@ARGV;say$x'
```
Demo:
```
$ perl -E '$o="+";/\D/?$o=$_:eval"\x=int\$x$o$_"for@ARGV;say$x' 5 8 25 \* 9 6 2 - 104 / 4 7 + 6 % 14
8
```
(Note that `*` has to be escaped in my shell so it's not interpreted as a glob pattern.)
## Ungolfed:
```
$o="+";                      # Start with addition
/\D/ ? $o=$_                 # If not a number, update the current operator
     : eval"\$x=int\$x$o$_"  # Otherwise, make a string like '$x=int$x+1' and eval it
for@ARGV;                    # Repeat for each item in the argument list
say$x                        # Print the result
```
[Answer]
# C#, 132 ~~165 168~~ bytes
This function assumes the input is valid. This is tough for C# given there's no `eval` equivalent.
Thanks [edc65](https://codegolf.stackexchange.com/users/21348/edc65) for saving 33 bytes!
Indented for clarity.
```
int C(string[]a){
    int o=1,r=0,n;
    foreach(var b in a)
        n=int.TryParse(b,out n)
            ?r=o<0?r%n
              :o<1?r*n
              :o<2?r+n
              :o<4?r-n
                  :r/n
            :o=b[0]-42;
    return r;
}
```
[Answer]
# Ruby, 59 bytes
```
a=0
o=?+
gets.split.map{|s|s=~/\d/?a=eval([a,s]*o):o=s}
p a
```
Test run:
```
$ ruby calc.rb <<< "5 8 25 * 9 6 2 - 104 / 4 7 + 6 % 14"
8
```
[Answer]
# C 122
**Thanks to @ceilingcat for finding a much better (and shorter) version**
```
#define A atoi(*a):s
o,s;main(z,a)char**a;{for(;*++a;)**a<48?o=**a-43:(1?s=o+6?o-4?~o?o-2?o?:s+A-A*A/A%A);printf("%d",s);}
```
[Try it online!](https://tio.run/##DYjbDoIgAIbvewpnc@MgMw3NJMd4FIZaXCRNvKrVq/9x9R2cuDsHHKd58eucmczuwRNm6RAPoYzqaf1K3qWl7mE3xqz6LGEjinFuFU19k70OYxIhzwOpdRwD73QQUv9CQqODHiI3wjBTmcJQ9dr8ui8kL6a8jFR9AbTo0bRguKJDA4H6JFFB4gKeToFa/gE "C (gcc) – Try It Online")
But if you are compiling it with mingw32 you need to turn off globbing (see <https://www.cygwin.com/ml/cygwin/1999-11/msg00052.html>) by compiling like this:
```
gcc x.c C:\Applications\mingw32\i686-w64-mingw32\lib\CRT_noglob.o
```
]