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
4. Contoso, Ltd. has a vigorous Office 365 and Azure cloud-service presence.
OverLord2011 [107]

Answer:

Contoso has an on-premises identity infrastructure. The infrastructure includes servers that run Active Directory Domain Services

Explanation:

3 0
2 years ago
Does anyone know any nitro type hack??
alexgriva [62]

Answer:

yes nitro hack is where they time your hacking skills

5 0
3 years ago
Read 2 more answers
What forms the foundation of cloud computing?
makkiz [27]
Virtualization. To enable easy deployment and scalability, it should be easy to spin up new machines on request. Virtualization offers the possibility to clone operating systems and deploy solutions independent of the actual hardware.
8 0
3 years ago
Choose the type of collection described.
Stella [2.4K]

Answer:

1) List

2) Dictionary

3) Tuple

Explanation:

A list uses square brackets. It is used to store multiple items in just one variable. They are usually changeable and give room for duplicates. You use append to add to the collection.

A dictionary uses curly brackets. You use update to add to the collection. A dictionary is created by placing the elements in curly brackets and separating them with a comma. It is changeable and it does not give room for duplicates.

A tuple uses parentheses. You cannot change it once you create it. It is an ordered list of elements that is finite and can also store multiple items in one variable.

7 0
2 years ago
Which of the following is an online library?
Mice21 [21]
Answer A. Hope it helped c:
4 0
3 years ago
Read 2 more answers
Other questions:
  • In the windows firewall, any rules preceded by a __________ checkmark have not been enabled. black gray green red
    13·1 answer
  • Which statement about the Paste Link option is true? A)Even if the source file (spreadsheet) is deleted, the data updates automa
    11·1 answer
  • Does time complexity depend on, which base arithmetic you use? like base 10, 2 or whatever else? Does time coplexity depned on t
    13·1 answer
  • The length property of the String object returns
    15·1 answer
  • At what x position are the ellipses drawn??? thanks ♡​
    6·1 answer
  • Which element would the search element be compared to first, if abinary search were used on the list above?
    6·1 answer
  • Explaio mode of Operation of x-ray​
    15·2 answers
  • Can an SQL function return multiple values? No answer needed, take the points.
    12·1 answer
  • Insert in the Current Values section at the top of the worksheet summary functions that use the range I9:I54. In cell I2, calcul
    7·1 answer
  • In the following nested loop structure, which loop does the program EXIT first?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!