CSH最近在高途上作文课,有个作业,写一篇作文“小xx找妈妈”。首先输入小动物的名字n,然后在输入它会碰到的动物的个数m,输入m个名字,最后一个一定与n名字相同。
从第一个开始,到m-1个的格式为:
n said:Are you my mom?
s[i] said:No,I am not your monther.I am s[i].
若是第m个,则格式为:
n said:Are you my mom?
s[i] said: Ow,yes,baby.
CSH最近在高途上作文课,有个作业,写一篇作文“小xx找妈妈”。首先输入小动物的名字n,然后在输入它会碰到的动物的个数m,输入m个名字,最后一个一定与n名字相同。
从第一个开始,到m-1个的格式为:
n said:Are you my mom?
s[i] said:No,I am not your monther.I am s[i].
若是第m个,则格式为:
n said:Are you my mom?
s[i] said: Ow,yes,baby.
int m。string n,s[1~m]。(m<=10)
先输入n,后m,再s[1~m]。
按格式输出,具体见样列。最后一行不要换行。
duck 3 dog cat duck
duck said:Are you my mom? dog said:No,I am not your monther.I am dog. duck said:Are you my mom? cat said:No,I am not your monther.I am cat. duck said:Are you my mom? duck said: Ow,yes,baby.