online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/* 11. Escriba un programa que valide (verifique) el formato de un correo electrónico: [email protected], donde: Elementos de nnnnn>= 3 Elementos de ssss>=6 Elementos de ttt >= 3 Por ejemplo para: [email protected], la salida debe ser: Correo correcto: [email protected] */ #include <iostream> #include <string> using namespace std; int main(){ string str = "[email protected]"; int len = str.size(); int indArroba = str.find("@"); int indPunto = str.find("."); if(indArroba+1 <= 4 || indPunto+1-indArroba <= 6 || len-indPunto <= 3){ cout<<"Verifique el correo"; }else { cout<<"Correo electrónico: "; for(int i=0; i<str.size(); i++){ if(isupper(str[i])){ str[i] = tolower(str[i]); } cout<<str[i]; } } 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