Question Need help on problem 6 of the attachment FUNCTION1 (A) //A is an array of length n 1) n = length[A] 2) count = 0 3) for (i=1; i<=n; i++) 4) for (j=1; j<=i; j++ 5) if A[j] <= 100 6) for(k=j; k<=j+2*i; k++) 7) A[j] = A[j]-1 8) count = count + 1 9) return (count)
Question
Need help on problem 6 of the attachmentFUNCTION1 (A) //A is an array of length n1) n =
length[A]
2) count = 0
3) for (i=1; i<=n; i++)
4) for (j=1; j<=i; j++
5) if A[j] <= 100
6) for(k=j; k<=j+2*i; k++)
7) A[j] = A[j]-1
8) count = count + 1
9) return (count)
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
