online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #define _LED_ROWS 5 #define _LED_COLS 5 static const unsigned int _LED_TABLE[_LED_ROWS][_LED_COLS] = { {4, 5, 14, 15, 24}, {3, 6, 13, 16, 23}, {2, 7, 12, 17, 22}, {1, 8, 11, 18, 21}, {0, 9, 10, 19, 20}, }; static unsigned char _LED_DISPLAY[_LED_ROWS][_LED_COLS] = { {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, }; int main() { int i, j, rows = 3; for(int i = 1; i <= rows; i++) { for(int j = 1; j < 2 * rows; j++) { if(j < i) //printf(" "); // space _LED_DISPLAY[i - 1][j - 1] = 0; //printf("SET LED %2.2d = 0\n", _LED_TABLE[i][j]); else if(j <= 2 * rows - i) //printf("*"); //star _LED_DISPLAY[i - 1][j - 1] = 1; //printf("SET LED %2.2d = 1\n", _LED_TABLE[i][j]); } printf("\n"); // new line for (size_t i = 0; i < _LED_ROWS; i++) { printf("{ "); for (size_t j = 0; j < _LED_COLS; j++) { printf("%u ", _LED_DISPLAY[i][j]); } printf("}\n"); } printf("\n"); } 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