# Answer to Question #24423 in C++ for Dreambig

Question #24423

write c++ program for the function((a+b)^4 - (a^4+4a^3b + 6a^2b^2)/(4ab^3+b^4)), at a=1000, b=10^-2,10^-3,10^-4

Expert's answer

#include<iostream>

#include<math.h>

using namespace std;

& double f(double a,double b){

double c;

& c=pow(a+b,4)-(pow(a,4)+4*b*pow(a,3)+6*pow(a,2)*pow(b,2))/(4*a*pow(b,3)+pow(b,4));

return c;

}

int main (){

double a,b;

a=1000;

b=pow(10,-2);

cout<<" a=1000, b=10^-2& : "<<f(a,b)<<endl;

b=pow(10,-3);

cout<<" a=1000, b=10^-3& : "<<f(a,b)<<endl;

b=pow(10,-4);

cout<<" a=1000, b=10^-4& : "<<f(a,b)<<endl;

&

system("PAUSE"); &

}

#include<math.h>

using namespace std;

& double f(double a,double b){

double c;

& c=pow(a+b,4)-(pow(a,4)+4*b*pow(a,3)+6*pow(a,2)*pow(b,2))/(4*a*pow(b,3)+pow(b,4));

return c;

}

int main (){

double a,b;

a=1000;

b=pow(10,-2);

cout<<" a=1000, b=10^-2& : "<<f(a,b)<<endl;

b=pow(10,-3);

cout<<" a=1000, b=10^-3& : "<<f(a,b)<<endl;

b=pow(10,-4);

cout<<" a=1000, b=10^-4& : "<<f(a,b)<<endl;

&

system("PAUSE"); &

}

## Comments

Assignment Expert18.02.13, 17:25You're welcome. We are glad to be helpful.

If you really liked our service please press like-button beside answer field. Thank you!

Dreambig18.02.13, 17:17Thank you so much!!!!!!!!!!

## Leave a comment