Using system; using system.collections.generic; namespace znanija1 { internal class program { public static void main(string[] args) { int c = 0; string s; s = console.readline(); var a = s.split(' '); for (int i = 0; i < a.length; ++i) { if (int32.parse(a[i]) % 2 == 0) { c++; } } console.write(c); } }}
marketing601
30.11.2021
Var a, n, ch, nch, i: integer; begin write("n: "); readln(n); ch: =1; nch: =0; for i: =1 to n do begin read(x); if x mod 2=0 ch: =ch*x; else nch: =nch+x; end; if ch=1 ch: =0; writeln("произведение чётных: ", ch, "; сумма нечётных: ", nch, "."); end. var i, n, o, p, x: integer; begin write("n: "); readln(n); p: =0; o: =0; for i: =1 to n do begin read(x); if x> 0 inc(p); if x< 0 inc(o); end; write("кол-во положительных чисел: ", p, "; кол-во отрицательных чисел: ", o, ". разница: ", abs(p-o)); end.
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
34 как в экселе подсчитать налог с продаж пропишите полностью нсп (налог с продаж) считается как 5% от (суммы с ндс)