online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int main() { void sumOfEven(int n, int a[]){ int temp=0,sum=a[0]; for(int i=1; i<n; i++){ sum=sum+a[i]; if(a[i]%2==1 && a[i-1]%2==0){ temp=temp+a[i]; //temp=a[i]; // printf("%d ",temp); } } printf("%d ",sum-temp); } int n; scanf("%d",&n); int a[n]; for(int i=0; i<n; i++) scanf("%d",&a[i]); sumOfEven(n,a); return 0; }

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