C++ Assignment

Program 1: Calculate the formula without power function a3+a4+2ab+3a3b3.
#include<iostream> #include<conio.h> using namespace std; int main() { int a,b,c; cout<<"Enter The Value of A="; cin>>a; cout<<"Enter The Value of B="; cin>>b; c=(a*a*a)+(a*a*a*a)+2*(a*b)+3*(a*a*a)*(b*b*b); cout<<"The Result of a3+a4+2ab+3a3b3 is = "; cout<<c; getch(); return 0; }

int main() { double a.h> using namespace std.b. getch(). #include<iostream> #include<conio.c.Program 02: Calculate the operation a3+b3+(a+b)2+7a42b.h> #include<math. cin>>b. e=pow((a+b).ans.3). cout<<"Enter The Value of A=". cin>>a. cout<<"The result of a3+b3+(a+b)2+7a42b is=". } .3). d=pow(b.d.e. cout<<ans. return 0.4). c=pow(a.f. cout<<"Enter The Value of B=". ans=c+d+e+7*f*2*b. f=pow(a.2).

c. cout<<"Enter The Value of D=".ans. cout<<ans.d. int main() { int a. cout<<"Enter The Value of B=". cout<<"Enter The Value of A=". cout<<"The Result of a2+b2+c2+d2+3a2b Is=".Program 03: Calculate the formula Without power function a2+b2+c2+d2+3a2b #include<iostream> #include<conio. return 0. cin>>a. getch(). cin>>b. ans=(a*a)+(b*b)+(c*c)+(d*d)+3*(a*2*b).b. cin>>d. cin>>c. } .h> using namespace std. cout<<"Enter The Value of C=".

cout<<"The Answer of a7+b7+3a6+3b7+a3 is=". cin>>a. cout<<"Enter The Value of A=". cin>>b.h> #include<math. } .ans.h> using namespace std.3).c.7).d.Program 04:Calculate the operation a7+b7+3a6+3b7+a3. #include<iostream> #include<conio.f. getch(). d=pow(b. return 0. cout<<"Enter The Value of B=". ans=c+d+3*e+3*d+f.6). e=pow(a. int main() { double a.b. f=pow(a. cout<<ans.e.7). c=pow(a.

cout<<"Enter The Value of C=". cout<<"Enter The Value of B=". g=pow(c.c. f=pow(b.3). . h=pow(d.d.g.b.h> #include<math. cout<<"The result of a+b+3a3b3c3d3 is=". cin>>b. ans=a+b+3*e*f*g*h.3).3).f.Program 05:Calculate the operation a+b+3a3b3c3d3. int main() { double a. cin>>d.h.h> using namespace std. cout<<"Enter The Value of D=". cin>>c. cout<<"Enter The Value of A=".ans. cin>>a. e=pow(a. #include<iostream> #include<conio. getch().e.3). cout<<ans.

} .return 0.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.