I don't know why the loop is not working.It only shows me the percentage T.
so for this program user are suppose to select the year they wish to review.
after that it will show the percentage for each sector for that year.
and i am suppose to show: manufacturing=..% construction=..% utilities=..% wholesale and retail trade=..% transport and storage=..%
The loop is working. You just do not show anything within the loop. Line 51 is outside the loop.
Hint: you do not need two loops. It'd suffice that the local year/total are adjusted. I strongly suggest that you name the local variables different from the globals.
Line 5: why is sector a char? Since it is an index, an int makes more sense.
Line 21,30: You're changing a variable in another module of the program. That a poor practice. Was sector by chance a value input by the user? If so, this is exactly why you should avoid globals.
Lines 24-28,40-44: Your percentages are single variables. After looping through the sectors, the percentages contain only the value from the last sector.
Lines 53,57,61,65,70: The value of sector is not valid here. The for loop changed the value of sector. At the bottom of the for loop (line 46) sector was incremented to 5.