Răspuns:
#include <iostream>
using namespace std;
int main()
{
int nr1,nr2;
char op;
cout<<"Primul numar:";
cin>>nr1;
cout<<"Al doilea numar:";
cin>>nr2;
cout<<"Operator:";
cin>>op;
if(op=='+')
cout<<""<<nr1<<"+"<<nr2<<"="<<nr1+nr2;
else if(op=='-')
cout<<""<<nr1<<"-"<<nr2<<"="<<nr1-nr2;
else if(op=='*')
cout<<""<<nr1<<"*"<<nr2<<"="<<nr1*nr2;
else if(op=='/')
cout<<""<<nr1<<"/"<<nr2<<"="<<nr1*1.0/nr2;
else
cout<<"Operatia nu se poate efectua";
}
Explicație: Nu stiu limbajul c,dar sper sa iti fie de folos cu ceva