how can i get the total of x value, x2 value, x3 value...???
i cant finish this home work for now thi is all i have...
realy need help...


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
cout<<"x value x2 value x3value\n\n";

int x=0, y, z;
back: x++;
if(y=x*x)
if(z=x*x*x)
cout<<" "<<x<<" "<<y<<" "<<z<<"\n";
if(x<10)
goto back;


system("PAUSE");
return EXIT_SUCCESS;
}

put everything in for loop

for(i=1;i<=n;i++) // n is no of multiples of x(x^2 , x^3.. etc) you need
      {
        y= y*x;// y=1 initialize it
        " print the value of y"
        you can also put as " (value of x) raised to (value of i) = " 
       }

and one more thing please read any good book on c++ you really need to make your concepts better. Dont use pointers and everything without the actual need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.