123123258852
16.04.2020 13:31

написать код в C# (Visual Studio).


написать код в C# (Visual Studio).

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Люда0001
22.09.2022 06:41
var a, b, c, D, x, y: real;
begin
 readln(a, b, c); {ax^4 + bx^2 + c = 0}
 if a = 0 then
 writeln('Non-bisquare')
 else
 begin
  D := b * b - 4 * a * c;
  if D < 0 then
  writeln('No solutions')
  else
  begin if D = 0 then
   begin x := -b / 2 / a;
    if x < 0 then
     writeln('No solutions')
    else writeln('2 solutions: ', sqrt(x), ' ', -sqrt(x));
   end
   else
   begin x := (-b + sqrt(D)) / 2 / a;
    y := (-b - sqrt(D)) / 2 / a;
    if x < 0 then writeln('No solutions');
    if x = 0 then
     writeln('1 solution: 0');
    if (x > 0) and (y < 0) then
     writeln('2 solutions: ', sqrt(x):0:3, ' ', -sqrt(x):0:3);
    if (x > 0) and (y = 0) then
     writeln('3 solutions: ', sqrt(x):0:3, ' ', -sqrt(x):0:3, ' 0');
    if y > 0 then
     writeln('4 solutions: ', sqrt(x):0:3, ' ', -sqrt(x):0:3, ' ', sqrt(y):0:3, ' ', -sqrt(y):0:3);
   end;
  end;
 end;
end.
0,0(0 оценок)
Ответ:
диля252
04.09.2020 13:06
1.program z;var a:array [1..10] of integer; i,t:integer; s:real;beginfor i:=1 to 10 dobegina[i]:=random(1,100);write(a[i]:4);if (odd(i)) and (odd(a[i])) then begins:=s+a[i];t:=t+1;end;end;writeln;write('Cреднее арифметическое = ',s/t);end.2.program z;var a:array[1..10] of integer; max,i:integer;beginwriteln('Исходный массив');for i:=1 to 10 dobegina[i]:=random(1,100);write(a[i]:4);if a[i]>max then max:=a[i];end;writeln;writeln('Измененный массив');for i:=1 to 10 dobeginif not(odd(a[i])) then a[i]:=max;write(a[i]:4);end;end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота