iv1as2
?>

Составьте таблицу истинности: 1- (а∧ в) ∨ ¬ (с∧ в); 2- (а∨¬в)→(¬с∧¬а)

Информатика

Ответы

monenko
Const 
    n = 3;
    k = 3;
var
  i,j,s1,s2:integer;
  a:array[1..n,1..k] of integer;
begin
  s1:=0;
  s2:=0;
for i:=1 to n do
    for j:=1 to k do
    begin
     Writeln('Введите a[',i,',',j,']:');
     readln(a[i,j]);
     if (a[i,j]>0) and (i<>j) then s1:=s1+a[i,j];
     if (a[i,j]<0) and (i<>j) then s2:=s2+a[i,j];
    end;
  if s1>s2 then
   for j:=1 to k do
    begin
      a[1,j]:=s1;
      a[n,j]:=s1;
    end;
  if s2>=s1 then
    for i:=1 to n do
    begin
     a[i,1]:=s2;
     a[i,k]:=s2;
    end;
 writeln('Полученный массив:');
  for i:=1 to n do
   begin
     for j:=1 to k do
   write('a[':4,i,',',j,']=',a[i,j]);
   writeln;
   end;
end.
ipeshindina236
#include <iostream.h>
#include <math.h>
int main()
{   
int a, b, c;   
long long d;       
cout << "Vvedite a: ";    cin >> a;   
cout << "\nVvedite b: ";    cin >> b; 
cout << "\nVvedite c: ";    cin >> c;    
d = b * b - 4  *a * c;     
if (d > 0) cout << "x1 = " << (-b + sqrt(d))/(2*a) << "\n" << "x2 = " << (-b - sqrt(d))/(2*a) << endl;
else if (d == 0) cout << "x = " << -1.*b/(2*a) << endl;
else if (d < 0) cout << "Korney net" << endl;
system("pause");
return 0;
}

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Составьте таблицу истинности: 1- (а∧ в) ∨ ¬ (с∧ в); 2- (а∨¬в)→(¬с∧¬а)
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

sales
Евгеньевич Балиловна1398
ksenyabobrovich7214
rubanvladimir374
byfetvostochniy
olgusikok
yatania-popovich7
Маргарита595
Татьяна1856
rimmaskis
Olybetezina1973
prianik6
azarovaelena19812
verynzik66525
palmhold578