信息技术学科教研
当前登录用户:
教学专题
  • 教学设计
  • 教学课件
  • 学案设计
  • 微课专题
  • 说课专题
  • 教学视频
  • 函数

    编辑发布:webdc   时间:2019/8/6 16:14:27   访问量:1171  评论条:  

    #include<iostream>

    using namespace std;
    int jia(int a,int b)
    {
        int temp = a+b;
        return temp;
    }
    int jian(int a,int b)
    {
        int temp = a-b;
        return temp;
    }
    int cheng(int a,int b)
    {
        int temp = a*b;
        return temp;
    }
    int chu(int a,int b)
    {
        if (b==0)
        return 0;
        else 
        {
           int temp = a/b;
            return temp;
        }
        
    }
    int main()
    {
        ///coding 
        int a,b,c,d;
        cin>>a>>b;
        cout<<jia(a,b)<<endl;
        cout<<jian(a,b)<<endl;
        cout<<cheng(a,b)<<endl;
        cout<<chu(a,b);
        
        ///do something 
        
        ///cout
        return 0;
    }

    sjfakl