(e) 2 - 4 + 6 - 8 + ............
.......................... - 20
write a program in Java to find the sum of the series
Answers
Answered by
7
Answer:
class exp{
void main(){
int s=0;
for(int i=2,k=1;i<=20;i+=2){
s+=(k*i);
k=-k;
}
System.out.println("the sum is "+s);
}
}
Answered by
2
Answer:
please mark me as a BRAINLIST my friend..
Attachments:
Similar questions
English,
6 months ago
Social Sciences,
6 months ago
English,
1 year ago
Physics,
1 year ago
Geography,
1 year ago