#include <iostream.h>
#include <conio.h>
void power (int *pr1, int *pr2, int *pr3)
{
*pr2=*pr1 * *pr1;
*pr3=*pr1 * *pr2;
}
void main (void)
{
int n, n1, n2, n3;
cout<<"Enter number and press enter!"<<endl;
cin>>n;
for(n1=1;n1<=n;n1++)
{
power(&n1, &n2, &n3);
cout<<n1<<'\t'<<n2<<'\t'<<n3<<'\t'<<endl;
}
getch();
}
|