Написать программу, вычисляющую значение функции у = f(x). = x – 2, если x > 0; = 0, если x = 0; y = |x|, если x < 0.
178
376
Ответы на вопрос:
Var x,y: real; begin read(x); if x> 0 then y: =x-2 else if x=0 then y: =0 else y: =abs(x); writeln(y) end.
var n: integer; a,b,c,d: integer; x,y,z: real; beginread(n); if n> 999 then begina: =n div 1000; b: =n mod 1000 div 100; c: =n mod 100 div 10; d: =n mod 10 div 1; x: =(a-b); y: =(b-c); z: =(c-d); if a> b then write(n*2) else if (x=y) and (y=z) then write ('arif posledovatelnost'); if (x< > y) and (y< > z) then write(n*2); endelse write('chislo ne 4 znachnoe'); end.
Популярно: Информатика
-
viktoria220604.06.2020 22:52
-
Rozia224421.05.2020 15:13
-
dVioletta04.05.2023 13:50
-
EvaKaa25.06.2022 08:39
-
joker90211.01.2022 00:50
-
lenapanfilova008.04.2023 22:56
-
vadimfroloww15.03.2023 12:11
-
АлисияАлисия18.04.2020 03:12
-
OgoKatya27.05.2020 05:00
-
dima0310200326.03.2023 05:40