输入那行格式写错了,应该是scanf("%d%d", &a, &b);
scanf("%d%d", &a, &b);
scanf中写错了,应该是
scanf("%d %d",&a,&b);
输入格式错误,不是%double,而是%d