l.m.a.o.
/tooshort
/tooshort


#include "stdafx.h"
#include <iostream>
#include <conio.h>
using namespace std;
class Calc { public:
double numb1,
numb2;
char operatore;
};
int main()
{
Calc tri;
cout<<"Press any key to start the Calculator :)"<<endl;
_getch();
system("cls");
cout<<"Insert the first number: ";
cin>>tri.numb1;
cout<<"\n\nInsert the second number: ";
cin>>tri.numb2;
cout<<"\n\nInsert the operator: ";
cin>>tri.operatore;
cout<<endl<<endl<<endl;
switch(tri.operatore){ case '+': cout<<tri.numb1<<" + "<<tri.numb2<<" = "<<tri.numb1+tri.numb2<<endl; break;
case '-': cout<<tri.numb1<<" - "<<tri.numb2<<" = "<<tri.numb1-tri.numb2<<endl; break;
case '/': cout<<tri.numb1<<" / "<<tri.numb2<<" = "<<tri.numb1/tri.numb2<<endl; break;
case '*': cout<<tri.numb1<<" * "<<tri.numb2<<" = "<<tri.numb1*tri.numb2<<endl; break;
default: cout<<"You may have entered an incurrect operator :p"<<endl;
}
_getch();
return 0;
}