1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Genrish500 [490]
3 years ago
10

A franchise restaurant is attempting to understand if customers think their service is good day-to-day by summarizing a series o

f daily scores. The restaurant computes a daily score based on the number of positive comments and negative comments it receives that day. Each the score begins at O. A positive comment adds 1 to the score, and a negative comment subtracts 1. So on a given day if there were 5 positive comments and 2 negative comments, the score for that day would be 3 (5-2) Your task is to write a program that enables a restaurant manager to input these daily scores and report the total score for those days. For example, if the score on Monday is 3, Tuesday is 4, Wednesday is -2, and Thursday is 3, then the total score for those days would be 3+4 +(-2)+3, which is 8. This would indicate the service is being positively reviewed over the past few days. You program should prompt the user for how many days of scores they will be entering, and then prompt them for the score for each day. The score prompt should include the number of the day for which they entering a score (i.e., notice the day 1 phrase in the prompt of the example below). Once all the scores have been entered, it should then output the number total score for those days Below is an example interaction with a program correctly solving this problem: How many days of scores? 4 Enter score for day 1: 2 Enter score for day 2:4 Enter score for day 3: -2 Enter score for day 4:1 The total score of the 4 days is 5
Computers and Technology
1 answer:
Crazy boy [7]3 years ago
7 0

Answer:

C++.

Explanation:

int main() {

   int num_days_scores;

   cout<<"How many days of scores? ";

   cin<<num_days_scores;

   cout<<endl;

///////////////////////////////////////////////////////////////////////////

   // Get scores for each day and add it to array

   int score = 0;

   int* score_array = new int[num_days_scores];

   for (int i = 0; i < num_days_scores; i++) {

       cout<<Enter score for day "<<i+1<<": ";

       cin<<score;

       score_array[i] = score;

   }

////////////////////////////////////////////////////////////////////////////

   // Calculate total of scores by traversing array

   int final_score = 0;

   for (int i = 0; i < num_days_scores; i++) {

       final_score += score_array[i];

   }

   cout<<"The total score of the "<<num_days_scores<<" days is "<<final_score;

////////////////////////////////////////////////////////////////////////////

   delete[] score_array;

   return 0;

}

You might be interested in
Which file extension takes less storage space?
anyanavicka [17]

I believe the answer would be the JPEG file extension.

4 0
2 years ago
Read 2 more answers
While you are working on your computer, it shuts down unexpectedly, and you detect a burning smell. When you remove the case cov
kumpel [21]

Answer:

fire

Explanation:

hydrant

6 0
2 years ago
How many times go you need to click the format painter button to apply copied formats to multiple paragraphs one right after the
Umnica [9.8K]
Double click would be enough
6 0
2 years ago
Read 2 more answers
What describes Accenture's approach to automation?
kogti [31]

human center because we describe stuff by what we see and obserevs

4 0
2 years ago
Read 2 more answers
An IPv4 address has 32 bits, so there are 232 (over 4 billion) possible IPv4 addresses. Since the Internet is gaining devices qu
Vladimir [108]

Answer:

Explanation:IPv4 is almost used up due to the constant increase in devices so therefore IPv6 was implemented to combat this issue, IPv6 uses 128 bit addresses, allowing 3.4 x 1038 unique IP addresses. This is equal to 340 trillion trillion trillion IP addresses. IPv6 is written in hexadecimal notation, separated into 8 groups of 16 bits by the colons, thus (8 x 16 = 128) bits in total. Which essentially means both me and you wont see IPv6 run out in our life times nor will you kids kids.

4 0
2 years ago
Other questions:
  • Fill in the blank. Do not abbreviate.
    6·1 answer
  • 5(x + 4) = 4(x -6) |<br><br><br>How to do this problem
    10·1 answer
  • You are a disgruntled employee with a master’s degree in computer sciences who was recently laid off from a major technology com
    11·1 answer
  • Help me on this question
    14·1 answer
  • What is output by the following C# code segment?int temp;temp = 180;while ( temp != 80 ) {if ( temp &gt; 90 ) {Console.Write( "T
    7·1 answer
  • It is important to name your files in a variety of formats. true or false
    15·2 answers
  • Describe the different
    12·1 answer
  • What are the three general methods for delivering content from a server to a client across a network
    8·1 answer
  • PLS HURRY<br> Look at the image below
    8·1 answer
  • 3. What of the following is the main components of computer system?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!