#include <iostream>#include <time.h> int main(){ srand(time(NULL)); int number1, number2; for( int i = 0; i < 20; ++i) { number1 = rand() % 3; number2 = rand() % 3; printf("%i, %i\n", number1, number2); } return 0;}
Standard input is empty
0, 0 0, 0 1, 1 1, 0 0, 1 2, 1 2, 1 1, 2 2, 2 0, 0 1, 0 0, 1 1, 2 1, 2 1, 0 1, 0 1, 2 0, 2 0, 0 0, 1
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!