输入输出框架

#include <bits/stdc++.h>
using namespace std;
int main(){
    int x;
    //scnaf读入成功时返回读入成功的个数,无法读入时返回0
    //在win下按回车,然后再按ctrl+z然后再按回车即可结束 
    while(scanf("%d",&x)==1){
        printf("%d\n",x);
    }
    //使用重定向
    //freopen("input.txt","r",stdin)
    //freopen("output.txt","w",stdin)
    return 0;
}

 

posted @ 2021-03-07 14:05  zmachine  阅读(119)  评论(0)    收藏  举报