temp.r
Source Code
Printing the code
To print this file, open it on GitHub and click Raw before printing, or use the Download Raw button above and print directly from that page.
r
s1 = rep(c(1,2,3,4,5), times=2)
s2 = c(5,4,3,2,1)
count = 0
for(i in s1) {
for (j in s2) {
if((i+j) %% 2 == 0) {
count = count + 1
print(sprintf("%d, %d, %d", i, j, count))
print(length(s1))
}
}
}
2^31
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13