#include <iostream>
#include <iomanip>
using namespace std;
int main(){
setlocale(LC_ALL, "Russian");
const int N = 10;
int array[N]= {1,2,3,4,5,6,7,8,9,10};
int i;
cout <<"До умножения на квадрат"<< endl;
for(i=0;i<N;i++)
{
cout << setw (5) << array[i];
}
cout<<" \n Умножение на квадрат"<< endl;
if(array[i]>0)
array[i]*=array[i];
return 0;
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
setlocale(LC_ALL, "Russian");
const int N = 10;
int array[N]= {1,2,3,4,5,6,7,8,9,10};
int i;
cout <<"До умножения на квадрат"<< endl;
for(i=0;i<N;i++)
{
cout << setw (5) << array[i];
}
cout<<" \n Умножение на квадрат"<< endl;
for(i=0;i<N;i++)
{
if(array[i]>0)
{
array[i]*=array[i];
}
cout << setw (5) << array[i];
}
return 0;
}