online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<iostream> using namespace std; enum colors {red,yello,blue,white,black};//定义球的枚举类型 colors color1; void transfer(int l)//将相应的数值组合通过switch语句转换为字符串 { color1=(colors)l; switch (color1) { case red:cout << "red "; break; case yello:cout << "yello "; break; case blue:cout << "blue "; break; case white:cout << "white "; break; case black:cout << "black "; break; } } int main() { int i, j, k; int count=0; for ( i = red; i <= black; i++) { for (j = i+1; j <= black; j++) { for (k =j+1; k <= black; k++) { transfer(i); transfer(j); transfer(k); cout <<endl; count++; } } } cout << count; 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