Problem G: 多个数的平均值之二

  核心:  EOF 的使用   while(scanf("%d",&a)!=EOF){ }   实现功能:  不断接受输入,我在{}里面实现了累加 想结果得到实现,需要在接受数据后敲击回车后,在敲击Ctrl+Z     代码: #include <stdio.h> #include <stdlib.h> int main() {     int a,sum=0,i=0;     while(sc
相关文章
相关标签/搜索