fprintf与fscanf
#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;
}else{
fprintf(stdout, "The value a is %d\n",a);
}
return 0;
}