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
Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does
Vitek1552 [10]

Answer:

See Explaination

Explanation:

This assume that input is a file and is given on command line. Please note this will ot print lines with frederick as thats what I feel question is asking for

#!/usr/bin/perl -w

open(FILE, $ARGV[0]) or die("Could not open the file $ARGV[0]");

while ($line = <FILE>){

if($line=~/\s+fred\s+/)

{

print $line;

}

}

close(FILE);

8 0
3 years ago
Distinguish between engineering and architecture​
Liula [17]

difference between engineering and architecture are.

A engineer is a person whose job involves designing and building engines, machines, roads, bridges ,etc .

While architect design buildings only.

3 0
3 years ago
How to tell if screen or screen protector is cracked?
beks73 [17]
You will feel the screen protector crack
6 0
3 years ago
Read 2 more answers
The ____ criteria filter requires the records displayed to start with the specified text string
lys-0071 [83]

The "Begins With" criteria filter is what your looking for

3 0
3 years ago
What theme could come from Piper's feelings and actions. Pixars short film piper
kaheart [24]

Answer:

Overcoming Fear

Explanation:

Given that a movie theme stimulates a universal human ordeal and at the same time, Piper is a short animated movie that was released in 2016. The fundamental idea of the movie is about a baby sandpiper who has to survive and conquer his anxiety and phobia of the water.

Hence, in this situation, the theme that could come from Piper's feelings and action is OVERCOMING FEAR

5 0
3 years ago
Other questions:
  • How can you put a logo on html without breaching the copyright, design and patents act
    12·1 answer
  • Each tab is divided into groups of related commands or buttons. T or F
    10·1 answer
  • Which of the following is a default letter assigned for the primary hard drive
    6·2 answers
  • Which of the following is the answer?
    5·1 answer
  • An internet connection is required to access which type of software?
    5·1 answer
  • On the Format tab, which group allows you to select a different font for a chart?
    7·2 answers
  • Buying a home security system is an example of protecting your home against________.
    5·1 answer
  • The contrast ratio of green-60 text on a yellow-10 background is ___ to 1.
    5·1 answer
  • Every time a key is pressed on the keyboard, the _______________ chip in the keyboard notices which key has been pressed.
    13·1 answer
  • Create a timeline of the evolution of computers and their impact on society
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!