online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/* Biblioteka <random> ma szereg generatorów ze znanych rozkładów prawdopodobieństwa. Dokumentacja biblioteki : en.cppreference.com/w/cpp/numeric/random Nieoficjalna dokumentacja : www.cplusplus.com/reference/random/ */ #include <random> #include <chrono> #include <iostream> using namespace std; int main () { /* Krok 1: wylosowanie ziarna na podst. pomiarów hardware'owych, m.in. temperatury */ random_device myRandomDevice; unsigned int seed = myRandomDevice (); /* Krok 2: inicjalizacja generatora rozkladu jednorodnego */ default_random_engine myGen ( seed ); /* Krok 3: generatory różnych rozkładów; transformują rozkład jednorodny */ uniform_int_distribution <int> uni_int ( 1 , 6 ); // Typ musi być jednym z całkowitych cout << "" << uni_int (myGen) << endl; uniform_real_distribution <double> uni_real ( 0. , 1. ); // Typ musi być jednym ze zmiennoprzecinkowych cout << "" << uni_real (myGen) << endl; normal_distribution <double> gauss_double ( 5. , 0.2 ); // argumenty: centroid, dyspersja cout << "" << gauss_double (myGen) << endl; binomial_distribution <int> binom_int ( 9 , 0.5 ); // argumenty: max liczba prób, P pojedynczego sukcesu cout << "" << binom_int (myGen) << endl; poisson_distribution <int> poisson_int ( 4.1 ) ; // argument: średnia z rozkładu cout << "" << poisson_int (myGen) << 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