问答详情
源自:3-2 算术运算符

include <stdio.h> 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 <stdio.h>

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;    

}


提问者:我的仰视30 2015-01-23 15:33

个回答

  • qq_ShortybCut_0
    2017-11-17 14:33:48

     printf("x%%y=%d\n",   x%y  );  

  • Perona
    2015-12-12 23:15:48

    笔记请记笔记区