Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. std::string input = "Sin(3x)";
  7.  
  8. // obtain inner content
  9. unsigned open = input.find("(") + 1;
  10. unsigned close = input.find(")") - 1;
  11. string output = input.substr(open, close - open);
  12.  
  13. printf("%s\n", output.c_str());
  14.  
  15. system("pause");
  16. return 0;
  17.  
  18. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement