Закрыт

BowlingGame

Write a program to score a game of Ten-Pin Bowling.

Input: string (described below) representing a bowling game

Ouput: integer score

The scoring rules:

Each game, or "line" of bowling, includes ten turns,

or "frames" for the bowler.

In each frame, the bowler gets up to two tries to

knock down all ten pins.

If the first ball in a frame knocks down all ten pins,

this is called a "strike". The frame is over. The score

for the frame is ten plus the total of the pins knocked

down in the next two balls.

If the second ball in a frame knocks down all ten pins,

this is called a "spare". The frame is over. The score

for the frame is ten plus the number of pins knocked

down in the next ball.

If, after both balls, there is still at least one of the

ten pins standing the score for that frame is simply

the total number of pins knocked down in those two balls.

If you get a spare in the last (10th) frame you get one

more bonus ball. If you get a strike in the last (10th)

frame you get two more bonus balls.

These bonus throws are taken as part of the same turn.

If a bonus ball knocks down all the pins, the process

does not repeat. The bonus balls are only used to

calculate the score of the final frame.

The game score is the total of all frame scores.

Examples:

X indicates a strike

/ indicates a spare

- indicates a miss

| indicates a frame boundary

The characters after the || indicate bonus balls

X|X|X|X|X|X|X|X|X|X||XX

Ten strikes on the first ball of all ten frames.

Two bonus balls, both strikes.

Score for each frame == 10 + score for next two

balls == 10 + 10 + 10 == 30

Total score == 10 frames x 30 == 300

X|X|X|X|X|X|X|X|X|81||

9-|9-|9-|9-|9-|9-|9-|9-|9-|9-||

Nine pins hit on the first ball of all ten frames.

Second ball of each frame misses last remaining pin.

No bonus balls.

Score for each frame == 9

Total score == 10 frames x 9 == 90

5/|5/|5/|5/|5/|5/|5/|5/|5/|5/||5

Five pins on the first ball of all ten frames.

Second ball of each frame hits all five remaining

pins, a spare.

One bonus ball, hits five pins.

Score for each frame == 10 + score for next one

ball == 10 + 5 == 15

Total score == 10 frames x 15 == 150

X|7/|9-|X|-8|8/|-6|X|X|X||81

Total score == 167

X|7/|9-|X|-8|8/|-6|X|X|81

Квалификация: Java, Архитектура ПО

Показать больше write read file program, write simple excel program, write assembly languages program add number, bowling games near me, bowling games online free 2 player, real bowling games, free bowling games download, bowling game 3d free, pc bowling games, bowling game rules, bowling games unblocked, write protect usb program, write flash card program iphone, write easy java program, write simple java program magtek card reader, write assembly language program matrix multiplication, write simple gui program, write gui java program, write assembly language program sort following numbers, freelancer write screen capture program

О работодателе:
( 0 отзыв(-а, -ов) ) Kansas City, United States

ID проекта: #19598654

12 фрилансеров(-а) в среднем готовы выполнить эту работу за $30

usman1493

Hey A Java expert developer is here I have good advanced expertise in Java and Javafx I can help you with your Java project as per your need This is an initial bid Feel free to message me Best Regards

$20 USD за 1 день
(205 отзывов(-а))
6.7
wangbeizou

Hello. How are you today. I have read and understood this task. I have a lots of experience and very good knowledge of Data structures, Algorithms Design, Computer Architecture. And I'm expert in Java, C/C++, Pyth Больше

$40 USD за 1 день
(163 отзывов(-а))
6.4
kipdev13

Hello,how are you? I have experiences for many years about Java and JavaScript programming. I have read your proposal quickly and then am sure you will get good result. I will do my best for you and you will be got Больше

$30 USD за 1 день
(84 отзывов(-а))
6.1
valor312

Hello. I have read your description and I am so interested in your project. I am confident in your project and I can finish it clearly on time. I am well experienced and skillful java and C++ programmer. I have +5 Больше

$30 USD за 1 день
(81 отзывов(-а))
5.9
webprof2

Hi, Please see my previous projects done in Java category especially Java Assignment type projects. I can do this assignment for you exactly based on your requirement. Hope to hearing from you. Regards, Webp Больше

$25 USD за 1 день
(81 отзывов(-а))
5.4
TalAkerele

[login to view URL] I am very happy to bid your project. i'd like to work with you. I read your requirements carefully,i see what you mean. i've been experienced with Java, Software Architecture. i 'll complete this project wi Больше

$25 USD за 1 день
(19 отзывов(-а))
4.8
BestService222

hello, sir I have read your sheet carefully. I am very interested in your project and I am looking forward to working with you. if you agree, I want to start your work. I will meet all the demands you want. Waiti Больше

$25 USD за 1 день
(16 отзывов(-а))
4.8
ownmyserver

Hello Greetings...!! I have read your project requirements. We are familiar with all required technologies and we have expertise resource to start with your project. We have 4+ year experience in Software develo Больше

$25 USD за 1 день
(14 отзывов(-а))
4.1
wozny

Dear Sir, I have 12 years of experience writing huge enterprise solutions for major companies worldwide. I like coding some minor tasks after work just for fun and that one looks like a pure fun to me. Regards, Tomas Больше

$20 USD за 1 день
(11 отзывов(-а))
3.6
vishalsha95570

If you want to implement your idea, then I am always ready for you Being a professional developer means to understand all the requirements of the project, and find the best way to implement it with the highest quality. Больше

$66 USD за 1 день
(8 отзывов(-а))
3.6
marksadler3

My experience is highly relevant to your profile. I am a very experienced software engineer, 20+ years of Java development. My CV is available on my profile. I have a question about your profile. Do you want t Больше

$20 USD за 1 день
(0 отзывов(-а))
0.0
ogursoy15

I am a computer engineering student and about to graduate.I write code clearly so that if someone else will be improving it, it will be easy to understand.I also took classes about agile programming Relevant Skills an Больше

$35 USD за 30 дней(-я)
(0 отзывов(-а))
0.0