Code: Select all
#include <iostream>
#include <string>
#include <sstream>
// State the purpose of the program: Simple Calculator
using namespace std;
int firstvar, secondvar;
string mathsymb;
int ergebniss;
int main()
{
cout<< " This is a simple calculator, enter the first Number:\n";
cin >> firstvar;
cout<< "Enter the Operator:\n";
cin >> mathsymb;
cout<< "Enter the second number:\n";
cin >> secondvar;
// wip1
if (mathsymb=+);
{
ergebniss= firstvar + secondvar ;
cout<< "The Result is: \n";
cout<< ergebniss;
}
if ( mathsymb=/)
{
ergebniss= firstvar/secondvar;
cout<< "The Result is: \n";
cout<< ergebniss;
}
if (mathsymb=*)
{
ergebniss= firstvar * secondvar;
cout<< "The Result is: \n";
cout<< ergebniss;
}
if (mathsymb=-)
{
//WIP2
ergebniss= firstvar -secondvar;
cout<< "The Result is: \n";
cout<< ergebniss;
}
else
cout<< "Wrong Entry: #Fatal Internal Error in Overcomplicated Desintegrated Modul 404_Bla.32.sys. You destroyed this holy shrine, enraged the machine spirits, do not even try to contact Support.\n";
cout << "Run, like you never ran beforrest. If you do it fast enough, they wont catch you for destroying unintelligent property..";
return 0;
}
No one? Well, got to troll some more, to get the critizens i adore.