Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
#include <iostream>
#include <vector>
using namespace std;
signed main() {
const int n = 7;
vector<int> a(n);
int max_elem = -INT_MAX, not_null_cnt = 0;
for(auto &i: a){
cin >> i;
max_elem = max(max_elem,i);
not_null_cnt += i != 0;
}
cout << "max elem = " << max_elem << "\n";
cout << "amount of not null elems: " << not_null_cnt;
4 клетки вниз и 7 вправо
var
i: integer;
s: real;
m: array[1..2,1..6] of real;
begin
s: =0;
for i: =1 to 6 do
readln(m[1,i]);
readln(m[2,i]);
s: =s+3.14*m[1,i]*m[1,i]*m[2,i]*1200;
end;
writeln(s);
end.
Популярные вопросы