Magma (IL) Interview Question

2 question about coin flip, some cpp