codice:using namespace std; int n1,n2,n3; char operatore; void add() { n3 = n1 + n2; } void sot() { n3 = n1 - n2; } void mol(){ n3 = n1 * n2; } void div() { n3 = n1 / n2; } int main(int argc, char *argv[]) { while (1) { cout << "Calcolatrice"<<endl; cout << "Per eseguire un operazione scrivere un numero, inserire un segno aritmetico ed un altro numero: "; cout << "Poi premere il tasto invio!\n\n\t"; cin >> n1 >> operatore >> n2; switch(operatore){ case('+'): add(); break; case('-'): sot(); break; case('*'): mol(); break; case('/'): div(); break; } cout << "\nIl risultato dell'operazione e' "<<n3<<endl; system("PAUSE"); } return 0; }