-
Notifications
You must be signed in to change notification settings - Fork 62
/
German_lotto.cpp
36 lines (22 loc) · 942 Bytes
/
German_lotto.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
using namespace std;
int main() {
//Numbers from 1 to 49
//Choose a subset of 6 Numbers
int a[] = {1,2,4,5,6,7,8,10,12};
int n = sizeof(a)/sizeof(int);
for(int i=0;i<n-5;i++){
for(int j=i+1;j<n-4;j++){
for(int k=j+1;k<n-3;k++){
for(int l=k+1;l<n-2;l++){
for(int m = l+1;m<n-1;m++){
for(int o= m+1;o<n;o++){
cout<<a[i]<<","<<a[j]<<","<<a[k]<<","<<a[l]<<","<<a[m]<<","<<a[o]<<endl;
}
}
}
}
}
}
return 0;
}