用while()讀取多筆測資
while(cin>>y && y)
or
while(cin>>y,y)
特殊用法詳見:
https://www.blogger.com/blog/post/edit/940906545268517615/562182535968132155