Thread: Help for Calculating Bowling Score

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    1

    Unhappy Help for Calculating Bowling Score

    I'm trying to write a code to calculate a bowling score. The in file will have just a line of characters (XXX9/90F99-) where X is a strike, / is a spare, F is a foul, and - is a gutter ball. What's the best way to go about getting analyzing each frame so that I can calculate the score for each frame. For instance, if you get a spare you get 10 pts plus however many points you score on the first ball of the next frame, and so on... a strike is 10 pts plus the next two balls of the next frame, etc. If anyone could just help nudge me in the right direction on some of the ways I could set up this problem let me know. I've considered functions for calculating the score, but there always seems to be something I'm missing.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    What have you considered? What do you think is missing?

  3. #3
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    when you say you have considered do you mean written stuff down or only gone through in your head or actually coded? post a function

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extracting lowest and highest score from array
    By sjalesho in forum C Programming
    Replies: 6
    Last Post: 03-01-2011, 06:24 PM
  2. Can anyone help?
    By javalurnin in forum C Programming
    Replies: 11
    Last Post: 12-02-2009, 06:02 AM
  3. C program using structs to calculate grades
    By TampaTrinDM88 in forum C Programming
    Replies: 4
    Last Post: 07-06-2009, 12:33 PM
  4. trouble with creating a loop to read certain number of inputs
    By import tuner650 in forum C++ Programming
    Replies: 2
    Last Post: 03-20-2008, 07:28 PM
  5. Need Help with a Bowling Score Program
    By oobootsy1 in forum C++ Programming
    Replies: 6
    Last Post: 11-01-2005, 10:04 AM