Last active
December 11, 2015 11:38
-
-
Save rajeevs1992/4595171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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}"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment