fprintf与fscanf

#include <stdio.h>

int main()
{
	//printf("Please input the value a:
");  等于下一句
	fprintf(stdout, "Please input the value a:
");
	int a;
	//scanf("%d",&a);  等于下一句
	fscanf(stdin,"%d",&a);
	if(a<0){
		fprintf(stderr, "The value must > 0
");
		return 1;
	}else{
		fprintf(stdout, "The value a is %d
",a);
	}

	return 0;
}

原文地址:https://www.cnblogs.com/fazero/p/4961911.html