#include <stdio.h> int main() { int a=2;double b=2.2;int sum; sum=a+b; printf("%f\n",sum); int b2=(int) b; printf("%d\n",sum); return 0; }
printf("%f\n",sum);应该是printf("%d\n",sum);