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

这里代码怎么打?

我想破头也不知道该怎么做,应该怎么输入,前面的课程我看了好几遍但还是搞不明白哪里出问题了

提问者:慕标0524891 2016-02-17 12:46

个回答

  • zmc1903150733
    2016-03-14 17:39:07

    搞不明白你为什么用 char来定义result,char应该是来定义字符的吧,比如char result='a';这里就算用也该是int吧


  • qq_小科比_0
    2016-03-06 14:59:35

    #include<stdio.h>

    int main()

    {

        int x,y;

        x=10;

        y=-3;

         printf("x+y=%d\n",x+y);   //printf  是输出  输出“”里面的

         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;

    }


  • 赵怀东
    2016-02-24 18:46:18

    #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;

    }


  • S_herry
    2016-02-17 13:17:04

    #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;   
    }

  • 慕仰3800911
    2016-02-17 13:16:43

    #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;

    }




  • ACDC
    2016-02-17 13:07:35

     int z =( x*8)/(y+2);