#include <stdio.h>
void main()
{
int a,b,c;
char *p;
p = "12,34,56";
sscanf(p
,"%d,%d,%d",&a
,&b
,&c
); printf("a=%d, b=%d, c=%d\n", a
, b
, c
);
p = "23 45 67";
sscanf(p
,"%d %d %d",&a
,&b
,&c
); printf("a=%d, b=%d, c=%d\n", a
, b
, c
); }
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIG1haW4oKQp7CiAgICBpbnQgYSxiLGM7CiAgICBjaGFyICpwOwogICAgCiAgICBwID0gIjEyLDM0LDU2IjsKICAgIHNzY2FuZihwLCIlZCwlZCwlZCIsJmEsJmIsJmMpOwogICAgcHJpbnRmKCJhPSVkLCBiPSVkLCBjPSVkXG4iLCBhLCBiLCBjKTsKCiAgICBwID0gIjIzIDQ1IDY3IjsKICAgIHNzY2FuZihwLCIlZCAlZCAlZCIsJmEsJmIsJmMpOwogICAgcHJpbnRmKCJhPSVkLCBiPSVkLCBjPSVkXG4iLCBhLCBiLCBjKTsKfQ==