It looks like you're new here. If you want to get involved, click one of these buttons!
why this?
int roll01 = 0;
int roll02 = 1;
int attempts = 0;
not this
int roll01 = 0;
int roll02 = 0;
int attempts = 0;
Someone asked this before too. If roll01 and roll02 are both equal at start then the condition stating roll01 == roll02 will be True at start the the loop will terminate. Hence the programme will not run.
They have different values at start so that they are given random values and if eventually both have equal values, loop terminates!
Answers
Thanks