4 Answers
New Answer4 Answers
New AnswerDesai It seems your question appears to be an assignment. Please show us your attempt and use the 8 rules to get help from the community. https://www.sololearn.com/Blog/38/8-simple-rules-to-get-help-from-the-community *can be a code coach solution which is meant for you to do to help you establish your skills abilities and where you need to learn... not the community *one issued by a school or other institution *one issued or created by another platform *one that appears to be in the form of a challenge that was created by you or somewhere else. Your question will be reviewed by a team of moderators and will most likely be marked for deletion. https://www.sololearn.com/Discuss/1316935/?ref=app
Hint: Modulo arithmetic is your friend here. Look at how to use the modulus operator '%' in whichever language you are using, since you failed to mention one.
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message