#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int ile;
int opcje[0];
srand( time( 0 ) );
//cin>>ile;
for(int x=0;x<9;x++)
{opcje[x]=rand()%2;
cout<<opcje[0]<<endl;
}
}
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int ile;
int opcje[0];
srand( time( 0 ) );
//cin>>ile;
for(int x=0;x<9;x++)
{opcje[0]=rand()%2;
cout<<opcje[0]<<endl;
}
}
Nie rozumiem co powoduje błąd w nr.1 oraz dlaczego ta petla leci w nieskonczonosc w nr2.