Just try it and see what will happen
Answer:
The algorithm:
Input days
sum = 0
for i = 1 to
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 do
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 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.
Answer:
The explanation is for 10 inputs though. You'd have to follow these steps to find input 50 numbers.
Explanation:
This is how I wrote it in the Plain English programming language which looks like pseudo-code but compiles and runs (to save you all the rest of the steps):
To run:
Start up.
Write "Enter 10 numbers separated by spaces: " on the console.
Read a reply from the console.
Loop.
If the reply is blank, break.
Get a number from the reply.
Add 1 to a count.
Add the number to a total.
Repeat.
Write "The total is: " then the total on the console.
Put the total divided by the count into an average.
Write "The average is: " then the average on the console.
Refresh the screen.
Wait for the escape key.
Shut down.
Answer:
Telemedicine refers to the practice of caring for patients remotely when the provider and patient are not physically present with each other. Modern technology has enabled doctors to consult patients by using HIPAA compliant video-conferencing tools.
Explanation:
Answer: Breaks in the word 2016 what do you mean
Explanation: