Var
a: array [1..12] of real; //Массив стоимости
s: real; //сумма
i: integer;
begin
s:= 0;
for i:= 1 to 12 do {12 раз вводим стоимость предмета и прибавляем ее к значению s}
begin
writeln('Введите стоимость предмета');
readln(a[i]);
s:= s + a[i];
end;
writeln('Общая стоимость всех предметов: ', s);
end.
var a,b,c,d:integer;
begin
write('a = ');
readln(a);
write('b = ');
readln(b);
write('c = ');
readln(c);
write('d = ');
readln(d);
writeln('X = ',(a*a+b*b)-c+d);
if (a*a+b*b)-c+d>0 then writeln(a,' + ',b,' = ',a+b)
else writeln(c,' + ',d,' = ',c+d)
end.
using System;
using static System.Console;
namespace ConsoleApp9
{
class Program
{
static void Main(string[] args)
{
double a, b, c, v, x, y;
Write("Input a: ");
a= double.Parse(ReadLine());
Write("Input b: ");
b = double.Parse(ReadLine());
Write("Input c: ");
c = double.Parse(ReadLine());
Write("Input x: ");
x = double.Parse(ReadLine());
Write("Input y: ");
y = double.Parse(ReadLine());
if (x < 3 && y < 0)
v = ((a + b + c) / 2) * Math.Min(x, Math.Min(y, (x + y) / (x - y)));
else if (x > 0 && y > 1)
v = Math.Max(x * x, y * y * y);
else
v = y * (a + b + c);
WriteLine("v=" + v.ToString());
ReadKey();
}
}
}