online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <iomanip> using namespace std; int main() { string x; string a = "black"; string b = "red"; string c = "white"; int e = 0, f =0, g = 0; //e = black; f = red; g = white; std::string yes_or_no; while(true) { cout << "input car color :"; cin >> x; if (x == a) { ++e; cout << "continue input car color(y/n)?"; std::cin >> yes_or_no; if(yes_or_no == "n") { break; } } else if (x == b) { ++f; cout << "continue input car color?(y/n)"; std::cin>>yes_or_no; if(yes_or_no == "n") { break; } } else if (x == c) { ++g; cout << "continue input car color?(y/n)" ; std::cin>>yes_or_no; if(yes_or_no == "n") { break; } } } cout << "detail car color" << endl; std::cout<<std::setw(11) << left <<"black: "<<e<<std::endl; std::cout<<std::setw(11) << left <<"red: "<< f<<std::endl; std::cout<<std::setw(11) << left <<"white: "<<g<<std::endl; 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