1 solutions

  • 0
    @ 2025-11-5 16:24:40

    C :

    #include <stdio.h>
    int main()
    {    
    	int x,y;
    	scanf("%d%d",&x,&y);
    	printf("%d+%d=%d\n",x,y,x+y);
    	printf("%d-%d=%d\n",x,y,x-y);
    	printf("%d*%d=%d\n",x,y,x*y);
    	printf("%d/%d=%d\n",x,y,x/y);
    	return 0;
    }
    

    C++ :

    #include <iostream>
    using namespace std;
    int main()
    {
    	int a,b;
    	cin>>a>>b;
    	cout<<a<<'+'<<b<<'='<<a+b<<endl;
    	cout<<a<<'-'<<b<<'='<<a-b<<endl;
    	cout<<a<<'*'<<b<<'='<<a*b<<endl;
    	cout<<a<<'/'<<b<<'='<<a/b<<endl;
    	return 0;
    }
    
    

    Pascal :

    var n,m:longint;
    begin
     readln(n,m);
     writeln(n,'+',m,'=',n+m);
     writeln(n,'-',m,'=',n-m);
     writeln(n,'*',m,'=',n*m);
     writeln(n,'/',m,'=',n div m);
    end.
    
    • 1

    Information

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