Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- #include<stdio.h>
- using namespace std;
- int main()
- {
- char exp[50],x[10];
- cout<<"\nEnter the function ";
- gets(exp);
- cout<<"\nEnter the value of x ";
- gets(x);
- ofstream o;
- o.open("temp.cpp");
- o<<"\n#include<stdio.h>\n#include<iostream>\nusing namespace std;\n int main()\n{";
- o<<"\nfloat res,x="<<x<<";";
- o<<"\nres="<<exp<<";";
- o<<"\ncout<<res<<endl;\n}";
- }
Advertisement
Add Comment
Please, Sign In to add comment