标准输入流输出流以及错误流
#include <stdio.h>
int main()
{
//printf("please input the value a:\n");
fprintf(stdout, "please input the value a:\n");
int a;
//scanf("%d",&a);
fscanf(stdin,"%d",&a);
if(a<0){
fprintf(stderr, "the value must > 0\n");
return 1;
}
return 0;
}

浙公网安备 33010602011771号