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
serious [3.7K]
3 years ago
13

Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the num

eric average of the numbers entered. Modify the program in Exercise 2a so that the user can enter any amount of numbers up to 20 until a sentinel value is entered.
Computers and Technology
1 answer:
Svetach [21]3 years ago
7 0

Answer:

Logic for a program

Explanation:

//Here ind = index

//declare the number

number ind

number sum

number avg

number SIZE = 20

number num[SIZE] = {0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0}

getReady()

while ind < SIZE

getNumbers()

stop

getReady()

ind = 0

sum = 0

return

getNumbers()

cout<< “Enter a number for position ”, ind

input numbers[ind]

sum = sum + numbers[ind]

ind = ind + 1

return ;

finishUp()

avg = sum/SIZE

ind = 0

while ind < SIZE

output numbers[ind], avg – numbers[index]

ind = ind + 1

return

Modify the program in 2a

number index

number sum

number avg

number actualSize

number SIZE = 10

number number[SIZE] = 0

You might be interested in
List the main industries in Sierra Leone​
Dafna11 [192]

Answer:

The main industries in Sierra Leone are: Diamond mining

Petroleum refining

Small - scale manufacturing (beverage, textiles,footwear)

Explanation:

They also engage in commercial ship repair

3 0
3 years ago
Why does the media play such an important role in our personal freedom? Select 3 options.
Helga [31]

Answer:

It promotes self-expression

It holds the government accountable

It keeps us informed

Explanation:

I got them right Ed

7 0
2 years ago
SOMEONE PLEASE HELP ME WITH THIS PLEASE!!!!!!
Brrunno [24]

Answer:

first one

Explanation:

3 0
3 years ago
Do the following SQL questions. The resulting columns must all have descriptive names. You must show the result of the query. Fo
Maslowich

Answer:

We can use CREATE command to create tables with columns having descriptive names

Explanation:

Firstly, create a table using CREATE  command in SQL. The syntax is as follows:

CREATE TABLE [table_name]

(

 [col_name] [datatype]),

[col_name] [datatype]),

[col_name] [datatype]),

[col_name] [datatype])

)

Once the table is created, we can insert the data into table using INSERT command. It's syntax is as follows:

INSERT INTO table_name VALUES('', '', '')

if datatype is string, values must be entered within single quotes. If datatype is int, values are entered directly without using  quotes.

Now, you can select the data from  the table using SELECT command. It's syntax is as follows:

SELECT column-list FROM table_name

If you want to filter rows according to conditions, you can use WHERE command.

I have created  sample table and inserted some data into it. Now, I applied some queries on it to select data from the table.

I have written in a text file and attached the same. Please find. Thank you!

Download txt
3 0
4 years ago
Suppose that actions can have arbitrarily large negative costs; explain why this possibility would force any optimal algorithm t
yuradex [85]

The reason why this cost is going to force the optimal algorithm to explore the entire state space is the fact that large negative costs can cause concurrent automatically for optimal solutions.

<h3>The step to take with a negative cost</h3>

Now if there is the existence of a large negative cost for each of these actions, the optimal algorithm is going to try an exploration of the whole space state.

The reason for this would be the fact that the route that has the least consequences would be better of.

Read more on negative cost here: brainly.com/question/7143854

3 0
3 years ago
Other questions:
  • Convot the following biliary number into decimal form using any method ? (1010.100)2
    8·1 answer
  • A ____ is text and graphics that print at the bottom of every page.
    12·1 answer
  • To illustrate a point in a Word document with a simple chart, what commands should you select?
    8·2 answers
  • Attempting to determine a password that is not known to the attacker is often called ____.
    13·1 answer
  • Identify one type of business or organization that you believe would have serious risks if they chose to use VLANs and/or VPNs.
    5·1 answer
  • Generally, the more secure the system, the less usable it becomes. <br> O True O False
    9·2 answers
  • Case Study
    15·1 answer
  • Which are examples of ribbon customizations?
    11·1 answer
  • Contrast between functions of sort and sorted in python . ​
    10·1 answer
  • Can you show me how to code this is GDBonline? explaining each statement with notes//
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!