C언어 로또
-
5. 로또 확률컴퓨터기초/#1 알고리즘 100선 2017. 2. 21. 17:59
#include #include #include #define MAXROLL 100000 void make_num(int*, int); int main() { int success_num[7]; int try_num[6]; int i, j, tryout = 0; int match, bonus; int grade[6] = {0,0,0,0,0,0}; srand(time(NULL)); make_num(&success_num, 7); for(tryout = 1; tryout < MAXROLL; tryout++) { match = 0; bonus = 0; make_num(&try_num[0],6); for(i = 0; i < 6; i++) { for(j = 0; j < 6; j++) { if(success_num..