online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> #include <queue> using namespace std; void ara(int); //Arama fonksiyonu prototipi queue<int> rakamlar; //global kuyruk int main() { int user_input; rakamlar.push(11); rakamlar.push(22); rakamlar.push(33); rakamlar.push(44); rakamlar.push(55); rakamlar.push(66); rakamlar.push(77); rakamlar.push(88); rakamlar.push(99); rakamlar.push(101); cout<<"Bir sayı giriniz :"; cin>>user_input; ara(user_input); return 0; } void ara(int sayi){ int gecerli_sayi; bool sayi_bulundu = false; for(int i=0;i<rakamlar.size();i++){ gecerli_sayi = rakamlar.front(); if(gecerli_sayi == sayi){ cout<<"Aradığınız sayı "<<i<<". sırada bulundu :)"; sayi_bulundu = true; } rakamlar.pop(); //Kuyruk başından aldığımızı rakamlar.push(gecerli_sayi);//Sona ekliyoruz } if(!sayi_bulundu) cout<<"Aradığınız sayı bulunamadı :("; }

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