How to get the output of the java programnbsp please


Code:

int [] a={1,2,4,0,0,0,0};

for(int i=3;i<7;i++)

{
a[i]=a[i-1]+a[i-2]*2+a[i-3]*3;
System.out.print(a[i]+" ");
}

the output is 11 25 59 142 and

Please explain in steps on how to get the output.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: How to get the output of the java programnbsp please
Reference No:- TGS01415073

Now Priced at $10 (50% Discount)

Recommended (91%)

Rated (4.3/5)