#include using namespace std; double fun( double x ) { \x05if ( x > -10 && x -5 && x 5 && x x; \x05\x05cout 麻烦用C语言写一下#include double fun( double x ){ if ( x > -10 && x <= -5 )return x + 2; else if ( x > -5 && x <= 5 )return x; else if ( x > 5 && x <= 10 )return x - 2; return 0;}int main(){ int x; while ( 1 ) {printf("x: ");scanf("%d", &x);printf("y: %ld\n\n", fun( x ) ); } return 0;}