im trying to get the user to type in an equation, and then have the app display the answer.
i have the users input as int input[256].
when i cin>> input;
it displays exactly what the user typed in, which i was expecting. is there a wat i can make the program solve the equation instead of repeating the equation the user typed in?
Code:void calculator() { cout<<"\n\n------------------------------------------------\n\n"; cout<<"DOS OS CALCULATOR\n\n"; cout<<"----------------------------------------------------\n\n"; calculatorcont(); } void calculatorcont() { char input[256]; int choice; cout<<"\n\nPlease enter the equation you wish to solve:"; cin>>input; cout<< "The answer is:" << input ; cout<<"\n\n Would you like to solve another equation?\n\n1.)Yes\n2.)No"; cout<<"\n\nSelection:"; cin>> choice; switch (choice){ case 1: calculatorcont(); break; case 2: desktop(); break; default: cout<<"INTERNAL ERROR [696E76616C696420656E74727900]"; cin.get(); cin.get(); return; } }