Computer Science, asked by kashemkhanrakib, 9 months ago

int a[4] = {2,4,6,8};
for(i=0;i<=1;i++)
{
s = a[i] + a[3 - i];
System.out.println(s);
}

Answers

Answered by Adarshthakur11
2

Answer:

1010( without spaces)

Explanation:

a[0]=2

a[1]=4

a[2]=6

a[3]=8

Loop works two times

first time for i=0

and second time for i=1

hope it helps you

Similar questions