Matrix coding in java

Find the output of the following coding in Java:

1
2
3
4
5
6
int []a={19,4,33,7,10};
int i;

for(i=0;i<=3;++i)
a[i+1]=( a[i]%2==0 ? ++a[i] : --a[i] );
System.out.print( a[i]+",");

log on to comprogzz.in to learn computer programming

×

Problem Loading...

Note Loading...

Set Loading...