Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.65 KB | None | 0 0
  1. Program P1;
  2.      
  3.       Var c,d,a,b: integer;
  4.       Var x: boolean;
  5.      
  6.    Begin
  7.    x:= false;
  8.    Writeln('Introduceti patru numere intregi:');
  9.    Write('a='); Readln(a);
  10.    Write('b='); Readln(b);
  11.    Write('c='); Readln(c);
  12.    Write('d='); Readln(d);
  13.    
  14.   if (a=b)and (c=d) then
  15.   x:=true;
  16.    
  17.    if (a=d)and (c=b) then
  18.    x:=true;
  19.  
  20.    if(a=c) and (d=b) then
  21.   x:=true;
  22.   if(x) then
  23.   writeln('numerele introduse pot reprezenta lungimile laturilor unui paralelogram' )
  24. else  
  25. writeln('numerele introduse NU pot reprezenta lungimile laturilor unui paralelogram' );
  26.  
  27. end.
  28.       Writeln('a=',a,' ','b=',b,'c=',c,' ','d=',d);
  29.      End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement