fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b,c;
  6. cin>>a>>b>>c;
  7. if (a+b==c)
  8. cout<<a<<"+"<<b<<"="<<c;
  9. if(a-b==c)
  10. cout<<a<<"-"<<b<<"="<<c;
  11. if(a/b==c)
  12. cout<<a<<"/"<<b<<"="<<c;
  13. if(a*b==c)
  14. cout<<a<<"*"<<b<<"="<<c;
  15. // your code goes here
  16. return 0;
  17. }
Success #stdin #stdout 0s 4416KB
stdin
12 2 6
stdout
12/2=6