online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#a = [1,2,3, 1, 3, 3, 6, 4, 2, 3, 5, 1, 0, 6, 7, 6, 7, 6, 3] a = [1, 2, 5, 4] res = 0 b = 0 for i in range(1, len(a)): if a[i - 1] == a[i]: b = 0 else: sign = 1 if a[i - 1] < a[i] else -1 res += a[i] * sign if b != sign: res += a[i - 1] * sign b = sign print(res) # -1

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue