I was wondering two things:
- What is a good GUI tutorial
- Do you think I'm ready to start using GUI
Code:#include <iostream> #include <cmath> using namespace std; inline void operations() { cout<<"x,/,+,-,^,s2(square root)\n"; } float math() { string line; float x; float y; char a; float answer; int it = 65; cout<<"enter an problem (o for operations)"; getline(cin,line); if(line.at(0) == 'o'){ operations(); } else{ cin>>x>>a>>y; } switch (a){ case 'o': answer = (char) it; operations(); break; case 's': answer = sqrt (x); break; case 'x': answer = x*y; break; case '/': answer = x/y; break; case '+': answer = x+y; break; case '-': answer = x-y; break; case '^': answer = pow (x,y); break; } return answer; } int main() { float answer = math(); cout<< answer <<"\n"; system("pause"); }



LinkBack URL
About LinkBacks


