Write a program to calculate average income by gender based on the following data, where F stands for female and M for male.
F 62,000
M 25,000
F 38,000
F 43,000
M 65,000
M 120,000
F 80,000
M 30,100
You should be able to allow users to type in a whole line such as F 80,000 followed by next line M 30,100.
Without any change made to your program, your program should be able to process a new set of data, such as follows:
M 52,000
M 35,000
F 48,000
M 33,000
F 75,000
F 110,000
F 90,000
M 30,100
22 則留言:
電子二丙9526249李昌訓
電子二乙 9526238 王詩集
電子四丙 方彥順 9326351
電子二乙 9526243 吳聖源
電子二丙 9526362 馮文甫
資工二甲9527118張哲銘
電子二乙 黃健暐 9526257
電子二乙9526248蔡泓修
醫工四甲9325146陳品汶
資工二甲 9527131 施宇涵
電子二乙9526224范丞儀
電子二丙 9526359 王仁澤
電子二丙 9526302 周崇曄
電子二丙 9526319 鍾宜展
資工二甲 陳晏禎 9527129
電子二乙 9526232 徐振倫
電子二丙 9526350 莊安富
電子二丙9526335陳綉青
電子三乙 9426231 吳奕欣
電子二甲9526150張凱鈞
醫工四甲9325120劉怡旻
張貼留言