Codecademy / learn-cpp

Codecademy | Learn C++
https://www.codecademy.com/learn/learn-c-plus-plus
715 stars 334 forks source link

My Version of RPSLS using modulo #76

Closed jacoboneill closed 1 year ago

jacoboneill commented 1 year ago

This uses the formula:

n = 5 (user - cpu + n) % n

This can in turn be used to tell if it is a tie, win, or loss

Might be good for an advanced example!

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.