It is necessary to add #include<math.h > into C++ program to use any mathematical function. The string uses only characters so first create function and give function name, and then use any data type related to math as integer or float. If require convert string into integer and float. Thus, it is possible to create mathematical formula with function and edit it.