*size of array kept 10;changed input format to separated by space