问题描述:
c语言循环 数据统计问题
I can't type Chinese ,very sorry!
example:input something that appears like M38,M means this person's sex,and 38 means his/her age.
Sex:M(male) or F(female)
Age:P or M or F
< 18 (P)unk
18~65 (M)iddle-aged
≥ 65 (F)ossil
------------------------------------Following is the input of an example.
Sex & age:M38
Sex & age:F41
Sex & age:M72
Sex & age:F65
Sex & age:M10
Sex & age:F12
Sex & age:M14
Sex & age:00
------------------------------------This is the result we get.
Total:7 (numbers of persons)
Female:PMF
Male:PPMF (classify their age according to sex)
------------------------------------
I will give credits for who that has helped me!
I can't type Chinese ,very sorry!
example:input something that appears like M38,M means this person's sex,and 38 means his/her age.
Sex:M(male) or F(female)
Age:P or M or F
< 18 (P)unk
18~65 (M)iddle-aged
≥ 65 (F)ossil
------------------------------------Following is the input of an example.
Sex & age:M38
Sex & age:F41
Sex & age:M72
Sex & age:F65
Sex & age:M10
Sex & age:F12
Sex & age:M14
Sex & age:00
------------------------------------This is the result we get.
Total:7 (numbers of persons)
Female:PMF
Male:PPMF (classify their age according to sex)
------------------------------------
I will give credits for who that has helped me!
问题解答:
我来补答展开全文阅读