First & Last occurence in array

My program doesn’t show the output and
it only takes input and input “https://ide.codingblocks.com/s/347544

refer to this corrected code: