online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; //forward declare the function bool palindrome (string a); int main() { string a; cout<<"Masukkan kata : "; cin>> a; if (palindrome(a) == true)//call the function and check the return value. { cout<<"Kata tersebut termasuk palindrome "; } else cout<<"Kata tersebut tidak termasuk palindrome"; } bool palindrome (string a) { int b; b= a.length(); if (b == 0) return 1; else if (a[0] != a[b - 1]) return 0; else return palindrome (a.substr(1, b - 2)); }

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