1 solutions

  • 0
    @ 2025-11-5 16:22:12

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<cstdlib>
    #include<cmath>
    using namespace std;
    int a=17,b=6;
    int main(){
        int mul,div,mod; double rdiv;
        mul=a*b;
        div=a/b;
        mod=a%b;
        rdiv=1.0*a/b;
        b=b+10;
        b=b+20;
        a=a-3;
        a=a-5;
        cout<<"a*b="<<mul<<endl;
        cout<<"a/b="<<div<<endl;
        cout<<"a%b="<<mod<<endl;
        cout<<"1.0*a/b="<<rdiv<<endl;
        cout<<"b="<<b<<endl;
        cout<<"a="<<a<<endl;
        
        // freopen("2465.out","w",stdout);
        //printf("a*b=%d\n",a*b);
        //printf("a/b=%d\n",a/b);
        //printf("a%b=%d\n",a%b);
        //printf("1.0*a/b=%lf\n",1.0*a/b);
        //printf("b=%d\n",b+10+20);
        //printf("a=%d\n",a-3-5);
    //    system("pause");
        return 0;
    }
    
    
    • 1

    Information

    ID
    17730
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By