Problem: 1143 - Squared and Cubic
Solution:
#includeusing namespace std; int main() { int n, i ; cin>>n; for(i=1; i<=n; i++) { cout<<pow(i,1)<<" "<<pow(i,2)<<" "<<pow(i,3)<<endl; } return 0; }
Code · Faith · Curiosity
cpp �� 2023-08-16 12:32:44
Problem: 1143 - Squared and Cubic
Solution:
#includeusing namespace std; int main() { int n, i ; cin>>n; for(i=1; i<=n; i++) { cout<<pow(i,1)<<" "<<pow(i,2)<<" "<<pow(i,3)<<endl; } return 0; }
Post Visited: 419 times
Categories: cpp
No comments yet. Be the first to comment!