#include<iostream>
#include<cmath>
using namespace std;
int main()
{ int k;
int x2,y3,z4;
cout<<"enter the value of k"<<endl;
cin>>k;
x2=k*k;
y3=x2*k;
z4=y3*k;
cout<<"the square of k is "<<x2<<endl<<"the 3rd power of k is"<<y3<<endl<<"the 4th power of k is"<<z4;
int i;
cin>>i;
return 0;
}
#include<cmath>
using namespace std;
int main()
{ int k;
int x2,y3,z4;
cout<<"enter the value of k"<<endl;
cin>>k;
x2=k*k;
y3=x2*k;
z4=y3*k;
cout<<"the square of k is "<<x2<<endl<<"the 3rd power of k is"<<y3<<endl<<"the 4th power of k is"<<z4;
int i;
cin>>i;
return 0;
}
No comments:
Post a Comment