#include<iostream>
using namespace std;
int main()
{
int n1, n2;
char A = 'a';
char S = 's';
char M = 'm';
char D = 'd';
char Op;
char xd;
cout<<"Basic Calculator"<<endl;
cout<<"a for additions, s for substractions, m for multiplications and d to divide"<<endl;
cout<<"Insert a number: ";cin>>n1;
cout<<"Insert another number: ";cin>>n2;
cout<<"Wich operation you want to do? ";cin>>Op;
if(Op == A){
cout<<"The result is: "<<n1+n2;
}
else if(Op == S){
cout<<"The result is: "<<n1+n2;
}
else if(Op == M){
cout<<"The result is: "<<n1*n2;
}
else if(Op == D){
cout<<"The result is: "<<n1/n2;
}
cin>>xd;
return 0;
}
A basic calculator, the first c code i made