#include <stdio.h> int main() { int year,month,date; scanf("yy-mm-dd=%d-%d-%d",&year,&month,&date); // 分号里面的逗号要移出来啊! printf("year=%d,month=%d,date=%d\n",year,month,date); }