#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
scanf("%*2s",&a);
printf("%d\n",a);
return 0;
}
输出:
1351 (input to scanf)
67 (output from printf)
无论我输入什么,答案总是 67。67 从哪里来?
最佳答案
从用户 user 获取 int 值:
int a;
scanf("%d",&a);
scanf 使用不同的说明符:
%d 个整数
%f float
%d 双
%c 字符
关于c - 无论输入什么,答案都是 67,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42469943/