这个能行么
保证被除数为负号 除数为正,加俩括号解决问题、。一位小白路过 #include
int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n",x+y ); printf("x-y=%d\n",x-y ); printf("x*y=%d\n",x*y ); printf("x/y=%d\n",(-x)/(-y) ); printf("x%y=%d\n",x%y ); return 0; }保证被除数为负号 除数为正,加俩括号解决问题、。一位小白路过 #include
int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n",x+y ); printf("x-y=%d\n",x-y ); printf("x*y=%d\n",x*y ); printf("x/y=%d\n",(-x)/(-y) ); printf("x%y=%d\n",x%y ); return 0; }2017-09-02
举报