If the question is "Write a program to find the sum of the series" What does this question means and what we have to do in this program ?
question from computer science Java
Answers
Answered by
1
Find the sum of the series.....
Eg:- the series is...... 1+2+3+4+5.......
Then the sum would be 15.
You will need a for loop which starts from the beginning value(here, 1) and goes till the upper limit(here, 5)
.inside the for loop,the statement should be added: sum=sum+i;(where the variable 'sum' has been initialized with 0)
Print the sum outside the loop and u ll get the output
Eg:- the series is...... 1+2+3+4+5.......
Then the sum would be 15.
You will need a for loop which starts from the beginning value(here, 1) and goes till the upper limit(here, 5)
.inside the for loop,the statement should be added: sum=sum+i;(where the variable 'sum' has been initialized with 0)
Print the sum outside the loop and u ll get the output
Similar questions
English,
7 months ago
Math,
7 months ago
Accountancy,
7 months ago
Physics,
1 year ago
Math,
1 year ago
Math,
1 year ago
World Languages,
1 year ago