- #1
PainterGuy
- 940
- 70
hello everyone,
okay. i am stuck here now. i was experimenting and though why can not i enter an expression at once. you understand what i am trying to achieve. i am newbie to programming so achieving this is beyond me so you tell me in the output "((7+7)*9)/9" is a string. is there any way to make if function as a math expression? tell me please if this is possible.
here's a example output:
cheers
okay. i am stuck here now. i was experimenting and though why can not i enter an expression at once. you understand what i am trying to achieve. i am newbie to programming so achieving this is beyond me so you tell me in the output "((7+7)*9)/9" is a string. is there any way to make if function as a math expression? tell me please if this is possible.
Code:
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
int main()
{
string exp;
cout << "enter the expression = ";
cin >> exp;
cout << exp << endl;
return 0;
}
here's a example output:
Code:
enter the expression = ((7+7)*9)/9
((7+7)*9)/9
Press any key to continue . . .
cheers