My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

evalute z+z*z/2 +z*z*z/3 +z*z*z*z/4

Tuesday, September 1, 2009

   #include<iostream.h>
   #include<conio.h>
   #include<math.h>
   void main()
   {
    float x,y,z;
    clrscr();
    cout<<"enter the value of x ";
    cin>>x;
    z=x/(x+1);
    y=z+pow(z,2)/2+pow(z,3)/3+pow(z,4)/4;
    cout<<"value of y=";
    cout<<y;
    getch();
  }

0 comments: