Ответ:
C++
#include <iostream>
#include<cmath>
using namespace std;
int main() {
setlocale(LC_ALL, "RUS");
int a;
cout << "Введите числа a: ";
cin >> a;
if (a > 0)
{
a = a * a;
}
else
a = a * a * a;
cout << "a = " << a << endl;
return 0;
A=int(input())
if A>0:
print(A**2)
else:
print(A**3)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
C++
#include <iostream>
#include<cmath>
using namespace std;
int main() {
setlocale(LC_ALL, "RUS");
int a;
cout << "Введите числа a: ";
cin >> a;
if (a > 0)
{
a = a * a;
}
else
{
a = a * a * a;
}
cout << "a = " << a << endl;
return 0;
}
A=int(input())
if A>0:
print(A**2)
else:
print(A**3)