Last active
May 5, 2017 17:31
-
-
Save cuter44/4da2b633a233e8f0220b65f19a099cb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char* argv[]) | |
{ | |
int d0[18]; | |
int d1[6]; | |
int t; | |
for (int i=0; i<18; i++) | |
d0[i] = rand() % 2; | |
for (int i=0; i<6; i++) | |
{ | |
t = d0[i*3] + d0[i*3+1] + d0[i*3+2]; | |
d1[i] = 6 + t%2*2 + t/2; | |
printf("%d", d1[i]); | |
} | |
printf("\n"); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment