1. Write an algorithm that accepts an integer n, a square n by n array of integers, and a positive integer k<n. The algorithm should sum up all the element from the main diagonal till k diagonals off the main diagonal. For example. If the following array was entered with the number k 3, then the algorithm should sum up all the shaded boxes. Show transcribed image text 1. Write an algorithm that accepts
OR
OR