#include<iostream>
#include<iomanip>usingnamespacestd;intmain(){inti,j,n;cout<<"How many numbers you want to print ";cin>>n;cout<<"—————————————————————————————";cout<<"\nNumbers |"<<" Squares\n";cout<<"—————————————————————————————\n";for(inti=1;i<=n;i++){j=i*i;cout<<setw(3)<<i<<" | "<<" "<<j<<"\n";}cout<<"—————————————————————————————\n";return0;}
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.