• 2021-04-14 问题

    有以下程序 #include double fun(double s,double a,double b) { a = (int)(s); b = s-a; return a+b; } main ( ) { double s=12.654,a=11,b=22; printf("%5.2lf,",fun(s,a,b)); printf("%5.2lf,%5.2lf\n",a,b); }程序运行后的输出结果是

    有以下程序 #include double fun(double s,double a,double b) { a = (int)(s); b = s-a; return a+b; } main ( ) { double s=12.654,a=11,b=22; printf("%5.2lf,",fun(s,a,b)); printf("%5.2lf,%5.2lf\n",a,b); }程序运行后的输出结果是

  • 1