Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9
Seems like homework, doesn't it? Well, I want you to know that we won't make a complete code for you, we help if you show us your attempt and what problem you are facing with it. https://www.sololearn.com/Discuss/1316935/?ref=app https://www.sololearn.com/Discuss/321242/?ref=app
3rd Jun 2020, 9:49 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
What hint you need ? Take for example the input Total score can be easily taken out Now batsman 1 is on strike for 1st ball ,and he scores 1 run ,now strike goes to batsman 2, he scores 2 at 2nd ball,and he holds the strike till 5th ball and when he scores 1 run again , over changes ,so he gets strike again and he hits a 6 at 7th ball or 1st ball of new over,and scores 2 run on 2nd ball and then 1 run and stroke finally goes to Batsman 1 and game ends with 3 runs scored by him
3rd Jun 2020, 8:20 AM
Abhay
Abhay - avatar
+ 1
I understood this theory of what's happening..but don't know how to code for that
3rd Jun 2020, 8:28 AM
Yabesh Sam
Yabesh Sam - avatar