while (scanf("%d",&n)!=EOF)

来源:互联网 发布:win10软件权限设置 编辑:程序博客网 时间:2024/05/16 05:57
// scanEOF.cpp : Defines the entry point for the console application.//#include "stdafx.h" int main()   {    int n; int array[25];    while (scanf("%d",&n)!=EOF)    {      for (int i=0; i<n; i++)      scanf("%d",array+i);      for ( i=0; i<n; i++)      printf ("%d ",array[i]);   }   printf ("EOF:%d \n",EOF);     return 0;   }/*^ZEOF:-1Press any key to continue*/

原创粉丝点击