Program Design Competition-bowling scoring system

Source: Internet
Author: User
There are ten players in a single game, and each player has two chances of pitching. If you fail to complete the first pitching, you need to make a second shot.
Possible situations of each grid:
1. fail
After two rounds, 10 bottles were not knocked down. The score in this case is the number of hits. If one hit is not hit, a "-" mark will be used.
2. Makeup
After the second round of replenishment, 10 bottles were knocked down, and the score for this case was 10 plus the number of bottles for the next round.
3. quanzhong
One-time knock down of 10, the score is 10 plus the number of bottles for the next two shots.
The tenth special case:
(1) If the second pitching is not completed, the score is the number of bottles knocked down twice.
(2) If the second match is completed, a pitching opportunity is added, and the score is the number of bottles that have been hit three times.
(3) If the first ball is in the middle, the second pitching opportunity is added, and the score is the number of three knocked-down bottles.
My Program:
# Include
# Include
# Include
Int first = 1; // The first output.
// Change the batching condition to the number of knocked-down bottles
Void turnint (char game [], int N, int num [])
{
For (INT I = 0; I

  • Next article:Puzzle game analysis
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.