rajeevs1992

The New Algorithm

Mar 22nd, 2011
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. #include<stdio.h>
  4. using namespace std;
  5. int main()
  6. {
  7. char exp[50],x[10];
  8. cout<<"\nEnter the function ";
  9. gets(exp);
  10. cout<<"\nEnter the value of x ";
  11. gets(x);
  12. ofstream o;
  13. o.open("temp.cpp");
  14. o<<"\n#include<stdio.h>\n#include<iostream>\nusing namespace std;\n int main()\n{";
  15. o<<"\nfloat res,x="<<x<<";";
  16. o<<"\nres="<<exp<<";";
  17. o<<"\ncout<<res<<endl;\n}";
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment