1) var a:string; i, o: Integer; p: Real; begin readln(o); a := inttostr(o); for i := 1 to length(a) do p := p + strtoint(a[i]); if (sqr(o) = p*p*p) then writeln('true') else writeln('false'); end.
2) var a:string; i, o, p: Integer; begin readln(o); a := inttostr(o); for i := 1 to length(a) do p := p + strtoint(a[i]); if (p mod 3 = 0) then writeln('true') else writeln('false'); end.
3) var a, b, c: real; begin readln(a, b, c); if ((a = b) and (b = c)) then writeln('true') else writeln('false'); end.
Всё проверено, удачи:)
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Процесс обработки данных, исключающий не нужные данные ответ:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int N;
cin >> N;
vector<int>negative;
vector<int>positive;
for (int i = 0; i < N; i++) {
int A;
cin >> A;
if (A < 0)
negative.push_back(A);
else
positive.push_back(A);
}
for (int i = 0; i < negative.size(); i++)
cout<< negative[i]<<" ";
for (int i = 0; i < positive.size(); i++)
cout << positive[i] << " ";
}