online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <time.h> #include <iostream> using namespace std; void eingabe(int* zahl); void game(int* zahl, int* versuche, int* rat); int main(void) { int zahl = 0; int rat = 0; int versuche =0; srand(time(NULL)); zahl = rand()%100 + 1; game(&zahl, &versuche, &rat); } void eingabe(int* zahl){ cout << "Gib deine geratene Zahl ein: " << endl; cin >> *zahl; } void game(int* zahl, int* versuche, int* rat){ do { eingabe(rat); if( *rat > *zahl ){ cout << "zu groß" << endl; } if( *rat < *zahl ) { cout << "zu klein" << endl; } *versuche ++; } while(*rat != *zahl && *versuche < 5); if ( *rat == *zahl ) { cout << "Erraten!" << endl; } else { cout << "Verloren! Die gesuchte Zahl war " << *zahl << 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