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

Computers and Technology:

Computers and Technology
1 answer:
Monica [59]3 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
What is the final gear reduction of a compound gear reduction of 36 to 12 for the first stage and 60 to 12 for the second stage?
OverLord2011 [107]

Answer:

8

Explanation:

Gear reduction = driven gear teeth / driving gear teeth

First stage reduction :

Driven gear teeth = 36

Driving gear teeth = 12

36 /12 = 3

Second stage reduction :

Driven gear teeth = 60

Driving gear teeth = 12

60 /12 = 5

First stage + second stage

3 + 5 = 8

5 0
3 years ago
The gene form of a trait is called a(n) ​
Rom4ik [11]

Answer:

alleles

Explanation:

7 0
3 years ago
Your motherboard supports dual channeling and you currently have two slots populated with DIMMs; each module holds 2 GB. You wan
Olenka [21]
One 4-GB DIMM. Dont really have a explanation for it just comes from previous experience
6 0
3 years ago
Read 2 more answers
What is this tool called?
kondor19780726 [428]
Is there a picture????????
4 0
4 years ago
Read 2 more answers
What kinds of circumstances would lead you to writing a function versus using a loop? please explain in simple terms
GREYUIT [131]

Answer:

1. You want to use parameters

2. You don't want your program to run multiple times

3. You want to call that snippet of code throughout your program

hope this helped :D

5 0
3 years ago
Other questions:
  • To keep your emails concise and to the point
    13·1 answer
  • What are some options available when using the Replace feature?
    13·1 answer
  • A ____ appearing in the main text of a document indicates a footnote or endnote.
    15·1 answer
  • Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
    9·2 answers
  • What are the pros and cons of using a linked implementation of a sparse matrix, as opposed to an array-based implementation?
    11·1 answer
  • Each computer on a network requires a unique way to identify itself and to refer to other computers. This is accomplished by usi
    8·1 answer
  • A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following
    11·1 answer
  • A Consider the following method definition. The method printAllCharacters is intended to print out every character in str, start
    11·1 answer
  • State whether the given HTML coding is True or False. <HR SIZE=5 COLOR=YELLOW ALIGN=RIGHT WIDTH=75%>​
    9·1 answer
  • Consider the following variable declarations and initializations.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!