Write the output for the following: class Output
{ public static void main(String args[]) {int a,b=0; int c[]={1,2,3,4,5,6,7,8,9,10}; for(a=0;a<10;a++) {if(a%2==0) b+=c[a];} System.out.print(b);}}
Answers
Answered by
2
Answer:
Output of given java program will be 2,4,6,8
Explanation:
Number divisible by 2
will be stored in variable b
Answered by
0
Answer:
225
Explanation:
Similar questions