要求输入123ABC456,输出a=123 b=456 c=ABC 怎么改?新手上路,求帮助
#include <stdio.h>void main()
{int a,b;char c;
scanf("%3d%s%3d",&a,&c,&b);
printf("a=%d\nb=%d\nc=%s\n",a,b,c);}
#include <stdio.h> int main() { int a, b; char c[4]; scanf("%3d%3s%3d", &a, c, &b); printf("a = %d\nb = %d\nc = %s\n", a, b, c); return 0; }