online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cstdlib> // Rastgele sayı için #include <ctime> // Zaman bilgisini almak için using namespace std; int main() { srand(time(0)); // Rastgeleliği başlat int gizliSayi = rand() % 100 + 1; // 1 ile 100 arasında bir sayı int tahmin; int hak = 5; cout << "1 ile 100 arasında bir sayı tuttum. Tahmin etmeye çalışın!" << endl; while (hak > 0) { cout << "Tahmininiz: "; cin >> tahmin; if (tahmin == gizliSayi) { cout << "Tebrikler, doğru tahmin ettiniz!" << endl; break; } else if (tahmin > gizliSayi) { cout << "Daha küçük bir sayı deneyin." << endl; } else { cout << "Daha büyük bir sayı deneyin." << endl; } hak--; if (hak > 0) { cout << "Kalan hakkınız: " << hak << endl; } else { cout << "Maalesef, hakkınız bitti. Doğru cevap: " << gizliSayi << 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