In this program, we will learn about taking integer input from the user and storing it in the array. Then…