Question #275520

toss a coin in c++ (simple toss) without using functions


Expert's answer

int coinToss() {
    int randomNumber;
    randomNumber = 1 + rand() % 2;


    return randomNumber;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS