Computer Science, asked by hobbyfollower748, 7 months ago

1)Draw a flowchart to the calculate the average from 25 exam scores.
2)Draw a flowchart which generates first 50 items of the
Fibonacci series: 1, 1, 2, 3, 5, 8,…? Pls answer quick!!

Answers

Answered by hhshah
2

Answer:

1. Block 1.Obtain marks of the 25 students. Block 2. sum up the marks. Block 3.divide the total sum by 25. Each block is an operation and in fact the flowchart is a block diagram given the simplicity of the exercise.

2. For this answer see the image given

Attachments:
Answered by amikkr
1

The flowcharts of those two are as follows,

  • First one, the steps can be, -[Start]⇒ [i=1,n=25, sum=o,] ⇒ [Input i th exam score, x] ⇒ [ sum=sum+x] ⇒ [ i=i+1] ⇒ [ is i>n] (If No Go back to 3rd) If YES⇒ [ avg =sum/n] ⇒ [Print avg] ⇒ [Stop] .
  • Second one, The flowchart which generates first 50 items of Fibonacci series, 1,1,2,3,5,8  is as follows,  [ Start ] ⇒ [i=0,j=1,k=0, fib=0] ⇒ [i<n?] ⇒ (If NO ⇒ END) (If YES,) ⇒ [Output "Fibonacci(i) = fib".] ⇒ [ output carriage return and linefeed ] ⇒ [fib=j+k] ⇒ [j=k] ⇒ [k=fib] ⇒ [i=i+1] ⇒ [Go back to 3rd step] .
  • Basically, a flowchart explains the steps of a program in a graphical way. For question one.

#SPJ3

Similar questions