Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float a , b , choose;
- cout << "What do want to do??" << endl << "1-integration" << endl << "2-differentiation" << endl << endl ;
- cin >> choose;
- cout << endl;
- if (choose==1)
- {
- cout << "You are going to use integration of X for a form like this:-" << endl << "aX^b" << endl << endl << "Enter the values of a and b" << endl;
- cout << "a=";
- cin >> a;
- cout << "b=";
- cin >> b;
- cout << endl << "---THE RESULT---" << endl;
- cout << a/(b+1) << "X^" << b+1;
- }
- else if (choose==2)
- {
- cout << "You are going to use differentiation of X for a form like this:-" << endl << "aX^b" << endl << endl << "Enter the values of a and b" << endl;
- cout << "a=";
- cin >> a;
- cout << "b=";
- cin >> b;
- cout << endl << "---THE RESULT---" << endl;
- cout << a*b << "X^" << b-1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment