#include"stdio.h"
int main()
{
int a,b,c;
printf("please enter three numbers\n");
scanf("%dp,%dp,%dp",&a,&b,&c);
printf("\n%d,%d,%d\n",a,b,c);
getchar(); //这里接收回车的吗?
getchar(); //那这里呢?
return 1;
}
这个程序能得到你想输出的东西!
输入“5P,3P,6P”(不包含引号!)
but我想问一下,你的getchar();使用两次你要干什么?我觉得没必要吧!还有返回1干什么?