1.
#include <iostream>
using namespace std;
int main(){
int n;
cout<<"Dati n=";cin>>n;
if(n>9999) {
cout<<"Numarul nu poate avea mai mult de 4 cifre! "<<endl;
return 0;
}
for (int i = 0; i <= n; i++) {
if(i>0 && i%5 == 0)
{
cout<<endl;
}
cout<<i*i<<" ";
}
return 0;
}
2.
#include <iostream>
using namespace std;
int main(){
int n,m;
cin>>n;
cin>>m;
for (int i = n; i <= m; i++) {
if(i>n && i%12 == 0)
{
cout<<endl;
}
cout<<i<<" ";
}
return 0;
}