Nothing. Just posting this for fun. it takes around 30 seconds to make.
I accomplished alot of things. I'm learning Direct3d right now.
Well, about 5 months ago. I was trying to make a small console digital calculator. I didn't even finished it and it was around 1000+ line of codes.
Now, today, i just said, why not try the digital calculator again with my C++ skills.
Haha, i just realized how easy it was.
Here's the code.
Oh well, back to Directx. Cya.Code:
#include<iostream>
#include<string>
using namespace std;
int main()
{
float value1;
string variable = "";
float value2;
while(1)
{
cout<<">>";
cin >> value1;
cin >> variable;
cin >> value2;
cin.get();
if(variable == "+")
{
cout <<value1 + value2;
}
else if(variable == "-")
{
cout <<value1 - value2;
}
else if(variable == "/")
{
cout <<value1 / value2;
}
else if(variable == "*")
{
cout <<value1 * value2;
}
cin.get();
system("cls");
}
cin.get();
return 0;
}
By the way, if your wondering how to use it.
Example:
5 * 5
5 + 5
Dont forget the spaces.
5(space) * (space) 5