online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; int main() { int data[] = {32, 30, 12, 60, 50, 5, 90, 9}; int key1,key2; cout<<"what two subsequent element do you want to find in the array? : "; cin>>key1>>key2; int datasize = sizeof(data); int numdata=datasize/sizeof(int); for (int i = 0; i < numdata-1; i++) { int num = key1; int num1 = key2; if (data[i] == num) { if (data[i+1] == num1) { cout<<"Yes, those number is in the array subsequently"<<endl; break; } else { cout<<"Nope, those number is not in the array subsequently"<<endl; } } } }

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