write a flowchart to print sum of squares of first 40 even natural number
Answers
Answered by
3
Answer:
I do not have the drawing tool to do this in flowchart, but here is the logic:
Start
SumNSq=0
N = 1
Adder: SumNSq = SumNSq + N*N
N < 50?
Yes:
N = N+1
Go to back to Adder:
No:
Print SumNSq
End
How it works:
Start: (Begin the process.)
Initialize the sum of the squares of integers, SumNSq to 0
Set the first integer,N to 1
Add the square of the current value of N (= N*N) to the current sum, SumNSq
Check if N less than 50:
If yes,
add 1 to the current value of N, and go back to step labeled Adder:
If no,
Print the value of SumNSq which should now be 1^2 + 2^2 +…. + 50^2 = 42925
End: (Complete the process)
Good luck!
Explanation:
Mark me as a branliest answer please
Similar questions