While with an input variable length (in the present example is a set of two) number, and the processing

Directly on the code:

#include <stdio.h>

int main()  //用while输入不定长个(本例子以两个为一组)数,并处理
{
    int a,b;
    while(scanf("%d %d",&a,&b)!=EOF)
	{
		printf("%d %d\n",a,b);		//注意:用本方法输入的数处理完后会一次性输出

	}
    return 0;
}

Note: processed by the present process will be entered after a one-time output.

Published 15 original articles · won praise 0 · Views 282

Guess you like

Origin blog.csdn.net/weixin_44562957/article/details/104117379