#include
int main()
{
int n;
int cnt = 0;
std: : cin > > n;
int **arr = new int*[n];
for(int i=0; i
arr[i] = new int[n];
for(int j=0; j
std: : cin > > arr[i][j];
//arr[i][j] = ++cnt;
}
cnt = 0;
while(cnt < n)
for(int i=0; i< (n-cnt); i++) std: : cout < < std: : setw(2) < < arr[cnt][i] < < " ";
std: : cout < < std: : endl;
cnt++;
delete [] arr[i];
delete [] arr;
arr = nullptr;
system("pause");
return 0;
#include <iostream>
#include<vector>
using namespace std;
int square(int x){
for (int i = 1; i <= 45; ++i){
if (i * i <= x){
continue;
return (i - 1) * (i - 1);
int x, y, xwas, ywas, xywas;
cin >> x >> y;
xwas = square(x);
ywas = square(y);
xywas = square(x + y);
if (xwas + ywas < xywas){
cout << "Petya gives paint to Vasya";
else if (xwas + ywas == xywas){
cout << "Equal";
else {
cout << "Petya leaves paint to himself";
}#include <iostream>
Объяснение:
#include
#include
int main()
{
int n;
int cnt = 0;
std: : cin > > n;
int **arr = new int*[n];
for(int i=0; i
{
arr[i] = new int[n];
for(int j=0; j
{
std: : cin > > arr[i][j];
//arr[i][j] = ++cnt;
}
}
cnt = 0;
while(cnt < n)
{
for(int i=0; i< (n-cnt); i++) std: : cout < < std: : setw(2) < < arr[cnt][i] < < " ";
std: : cout < < std: : endl;
cnt++;
}
for(int i=0; i
delete [] arr[i];
delete [] arr;
arr = nullptr;
system("pause");
return 0;
}
#include <iostream>
#include<vector>
using namespace std;
int square(int x){
for (int i = 1; i <= 45; ++i){
if (i * i <= x){
continue;
}
return (i - 1) * (i - 1);
}
}
int main()
{
int x, y, xwas, ywas, xywas;
cin >> x >> y;
xwas = square(x);
ywas = square(y);
xywas = square(x + y);
if (xwas + ywas < xywas){
cout << "Petya gives paint to Vasya";
}
else if (xwas + ywas == xywas){
cout << "Equal";
}
else {
cout << "Petya leaves paint to himself";
}
return 0;
}#include <iostream>
#include<vector>
using namespace std;
int square(int x){
for (int i = 1; i <= 45; ++i){
if (i * i <= x){
continue;
}
return (i - 1) * (i - 1);
}
}
int main()
{
int x, y, xwas, ywas, xywas;
cin >> x >> y;
xwas = square(x);
ywas = square(y);
xywas = square(x + y);
if (xwas + ywas < xywas){
cout << "Petya gives paint to Vasya";
}
else if (xwas + ywas == xywas){
cout << "Equal";
}
else {
cout << "Petya leaves paint to himself";
}
return 0;
}
Объяснение: