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
Irina-Kira [14]
2 years ago
14

Computers and Technology:

Computers and Technology
1 answer:
Monica [59]2 years ago
3 0

Answer:

The algorithm:

Input days

sum = 0

for i = 1 to days

   input text

   sum = sum + text

end for

average = sum/days

print average

The program in pascal:

var days, sum, text, i:integer;

var average : real;

Begin

    write ('Days: '); readln(days);

    sum:=0;

    for i := 1 to days do begin

         write ('Text: ');  readln(text);  

         sum:=sum+text;

    end;

    average := (sum/days);

    writeln ('The average text is' , average);

End.

Explanation:

This declares all variables

var days, sum, text, i:integer;

var average : real;

This begins the program

Begin

This gets the number of days from the user

    write ('Days: '); readln(days);

Initialize sum to 0

    sum:=0;

This iterates through the days

    for i := 1 to days do begin

This gets the text for each day

         write ('Text: ');   readln(text);  

This sums up the texts

         sum:=sum+text;

End loop

    end;

Calculate average

    average := (sum/days);

Print average

    writeln ('The average text is' , average);

End program

End.

You might be interested in
A set of connected ideas supported by examples is ?
andrezito [222]

Answer:

Argument

Explanation:

<u>Argument</u> - A set of connected ideas, supported by examples, made by a writer to prove or disprove a point.

5 0
2 years ago
Read 2 more answers
¿Por qué es importante que lo países crezcan a nivel tecnológico?
IrinaK [193]

Answer:

Importancia de la tecnología en el crecimiento económico de los países. ... El desarrollo de estas vías tecnológicas aporta un aspecto positivo como el ahorro del tiempo, la disminución de los esfuerzos de los trabajadores que permite una economía progresiva.

Explanation:

4 0
2 years ago
What processes can move a solute against its concentration gradient?
Rudiy27

Explanation:

To move substances against a concentration or electrochemical gradient, the cell must utilize energy in the form of ATP during active transport. Primary active transport, which is directly dependent on ATP, moves ions across a membrane and creates a difference in charge across that membrane.

7 0
3 years ago
During spring in Colorado, ice on the mountain tops melts into water. Some of this water gets trapped in cracks in the mountain
zlopas [31]
Physical weather. It isn't changing the the chemical or biological make up.
3 0
3 years ago
Read 3 more answers
The Sleeping-Barber Problem:
s2008m [1.1K]

Answer:

Explanation:

Following are the Semaphores:

Customers: Counts waiting customers;

Barbers: Number of idle barbers (0 or 1)

mutex: Used for mutual exclusion.

Cutting: Ensures that the barber won’t cut another customer’s hair before the previous customer leaves

Shared data variable:

count_cust: Counts waiting customers. ------------copy of customers. As value of semaphores can’t access directly.

// shared data

semaphore customers = 0; semaphore barbers = 0; semaphore cutting = 0; semaphore mutex = 1;

int count_cust= 0;

void barber() {

while(true) { //shop is always open

wait(customers); //sleep when there are no waiting customers

wait(mutex); //mutex for accessing customers1

count_cust= count_cust-1; //customer left

signal(barbers);

signal(mutex);

cut_hair();

}

}

void customer() {

wait(mutex); //mutex for accessing count_cust

if (count_cust< n) {

count_cust= count_cust+1; //new customer

signal(customers); signal(mutex);

wait(barbers); //wait for available barbers get_haircut();

}

else { //do nothing (leave) when all chairs are used. signal(mutex);

}

}

cut_hair(){ waiting(cutting);

}

get_haircut(){

get hair cut for some time; signal(cutting);

}

6 0
3 years ago
Other questions:
  • It is important that researchers design rigorous study methods to eliminate: a. inferences. b. the need for a CONSORT flow chart
    10·1 answer
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • Hello, can you help me answer these questions?
    9·2 answers
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • Which of the following is not a good technique for photographing groups? Visiting the location.
    9·1 answer
  • Which social media post indicates your home may be unattended?
    10·1 answer
  • Ryan is looking to buy a new HDTV set. He knows from friends that LCD set screens reflect less light than plasma set screens, bu
    10·1 answer
  • What is one major difference between the roles of film directors and theater directors? A. A theater director is involved in sel
    14·1 answer
  • One of the functions of an IDE is to check for: flowchart errors. Syntax errors. memory errors X input and output.​
    12·2 answers
  • - O conhecimento na Educação Física, normalmente passa do senso comum e vai para um conhecimento mais formal, ou seja, do conhec
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!