array index from loop

Commonly used Loops: In programming languages, loops are used to do anything repeatedly. Sometimes we need to perform the same task again and again then at that point loops save our time and efforts. The idea of the loop is…