add problem5
problem5 loop starts from 0