fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5. int main()
  6. {
  7. srand( time( NULL ) );
  8. std::cout << "Wylosowanie pierwsze: " <<rand() % 2 << std::endl;
  9. int liczba =rand() % 2;
  10. std::cout << "Wylosowanie drugie: " << liczba << std::endl;
  11. liczba =rand() % 2;
  12. std::cout << "Wylosowanie trzecie: " << liczba << std::endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 4172KB
stdin
Standard input is empty
stdout
Wylosowanie pierwsze: 1
Wylosowanie drugie: 0
Wylosowanie trzecie: 1