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
Blababa [14]
3 years ago
3

Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array.

Use a loop to calculate the total sales for the week and display the result. cpp
Computers and Technology
1 answer:
ahrayia [7]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int  storeSales [7];

   //Receiving user input

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

       cout<<"Enter the sales"<< endl;

       cin>>storeSales[i];

   }

   //calculating and printing the total

   int total = 0;

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

       total = total + storeSales[i];

   }

   cout << "The total is: " <<total<< endl;

   return 0;

}

Explanation:

  • Using C++ programming language
  • Create an array of size seven (Since there are seven days in a week)
  • Use a for loop to add up elements to the arrays when user is prompt
  • use a second for loop to calculate the total of the element added
  • Outside the second for loop, print the total
You might be interested in
Ryan needs to see the space available to insert content on a slide in his presentation. Which feature of a presentation program
Sav [38]

The feature that Ryan should take advantage is Layout, which is available in his presentation, to insert the content he wants, be it a graph, picture, paragraph, bullet points, video, etc. Assuming this is a Microsoft PowerPoint, Ryan can right-click the slide he wants to put the content in, where an option window would appear. He should click on the ‘Layout’ option and several types of layouts available for him to put content on would appear: Title & Content, Two Content, Comparison, and Content with Caption.

3 0
3 years ago
What is a text based language that can be used to build all kinds of things ????
Makovka662 [10]

Answer:

It's easier to define text-based programming languages. These are languages that are typed using a keyboard and stored as text files. A graphical or visual language typically uses drag and drop rather than typing. It may use icons or textual labels on blocks or elements.

4 0
3 years ago
Attribute that contains only digits as a character data type instead of a numeric data type
oee [108]
<span>Sometimes a number sequence is pointless as a number. for instance, you would never perform a mathematical function on a phone number or social security number, but you might want to use them as string types - for instance to append or remove an area code or something.</span>
5 0
4 years ago
True false) ther are five arrow keys on the keborad​
cluponka [151]

Answer:

false, there's only 4

Explanation:

5 0
4 years ago
When creating an input/output table, where do you enter the formula?
balu736 [363]

When creating an input/output table, where do you enter the formula?  

A. In the input cell

B. In the output cell

C. In the title cell

D. In the table of contents


<u>ans. (B) In the output cell</u>

4 0
3 years ago
Other questions:
  • When u look at a green object through red glass the object will appear
    11·2 answers
  • Su wants to apply the new font to the other slides of the presentation. She knows she can use the Format Painter tool
    12·1 answer
  • What additional information could you add to a sketch to provide other team members with a more accurate design drawing?
    9·1 answer
  • Using this tool to help you to visualize your slides and develop your content
    13·1 answer
  • Information technology has powerful effects on social behavior. Which of the following issues should NOT be expected when intera
    11·1 answer
  • Write a method that accepts a number of seconds and prints the correct number of hours, minutes, and seconds.
    9·1 answer
  • Write a function named is_sub_dict that accepts two dictionaries from strings to strings as its parameters and returns True if e
    5·1 answer
  • Explain the principle of a Kimball as a data input device<br>​
    5·2 answers
  • What is the output of the following program?
    11·2 answers
  • 1 Which one of the following is a transmission
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!