programming

would someone be able to give me an idea of how to start coding this in C?

You just finished playing cards with a group of friends and each time your score changed in the game you wrote
it down. Given the total number of points it takes to win the game and all of your scores (a maximum of 25) determine
how many games were played and the number of games that you won. At the start of each new game the scores would
reset back to zero but you didn't always write this down.

ex:

Enter winning score: 5
Enter score #1 or -1 to exit: 1
Enter score #2 or -1 to exit: 2
Enter score #3 or -1 to exit: 3
Enter score #4 or -1 to exit: 1
Enter score #5 or -1 to exit: 2
Enter score #6 or -1 to exit: 1
Enter score #7 or -1 to exit: 2
Enter score #8 or -1 to exit: 3
Enter score #9 or -1 to exit: 4
Enter score #10 or -1 to exit: 1
Enter score #11 or -1 to exit: 3
Enter score #12 or -1 to exit: 5
Enter score #13 or -1 to exit: 1
Enter score #14 or -1 to exit: 2
Enter score #15 or -1 to exit: -1
Scores entered (14): {1, 2, 3, 1, 2, 1, 2, 3, 4, 1, 3, 5, 1, 2}
Number of games won: 1
Number of games played: 5

  1. 👍 0
  2. 👎 0
  3. 👁 115
asked by sara

Respond to this Question

First Name

Your Response

Similar Questions

  1. English

    I was wondering if anyone could give me an idea for this essay prompt? Describe a situation in which you have made a direct impact on the life of someone else. I just have no idea where to start or write about...

    asked by Jack on March 3, 2018
  2. Earth science..... help urgent

    hi can anyone help me? my problem is that i need to write a autobiography about the "LIFE CYCLE OF ROCKS". andf i have no idea how to start it.....plz help me....its urgent....give me some clues how to start !!!!

    asked by veronica on December 17, 2008
  3. Coding

    I have read the coding guidelines for V codes inpatient and out patient. I am missing something. Can anyone give me any in put on the differentiate offical coding guidelines for the V codes.

    asked by Debbie on January 25, 2009
  4. medical coding True or False

    Please check my answer thanks The coding supervisor is interviewing candidates for a new out patient coding position the JOB DESCRIPTION will assist bthe coding supervisor in this process I said true

    asked by saretha on May 1, 2008
  5. writing

    Iam writing for the medical coding positon at Greenwood Leflore Coding service because my experience with my son stay in the hospital. My passion for medical Coding arose due to his illiness. His diganoses for his conditon

    asked by willie on May 21, 2012
  6. psych

    Give some background information on your hypothetical observational study - describe the setting that you would use for your observational study, why you are interested in this study and what you hope to learn. (2) Explain whether

    asked by STELLA on November 19, 2011
  7. english

    i love the three topics but how should i start the intro i know one sentence but could you give me a idea like about the sport how should i start because i love boxing i want to write about that. thank you.

    asked by henry on July 29, 2009
  8. Quality management/performance improvement

    as a health information management coding supervisor, you have been asked to compare the steps of the current coding process with a proposed coding process. what would be the best tool to use for this process? a. Root-cause

    asked by Lori on January 19, 2012
  9. computer science

    I have a computer science project that uses the coding software called Processing but I don't know where to start. I would like someone to help me start the project

    asked by Anisa on April 10, 2019
  10. medical Billing and coding

    How do i start off a research paper on medical billing and coding? please help.. It is worth 200 points in class

    asked by Mrs.brunson on April 27, 2010

More Similar Questions