online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
program main implicit none integer :: k = 3 integer, allocatable :: A(:), S(:) integer i, kk A = [ 1, 2, 3, 4, 5 ] kk = min( size(A), k ) allocate( S(0:kk) ); S = 0; S(0) = 1 do i = 1, size( A ) S(1:kk) = S(1:kk) + A(i) * S(0:kk-1) end do print *, sum( S ) - 1 end program main

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