Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a, b, c:array [1..100] of real;
- i, j, n:integer;
- begin
- repeat
- readln(n);
- until (n < 101) and (n > 0);
- for i := 1 to n do
- begin
- readln(a[i], b[i]);
- //a) c[i] = min {a[i], b[i]} | c[i] postaje manji
- if a[i] > b[i] then c[i] := b[i]
- else c[i] := a[i];
- //b) c[i] = max{a[i], b[i]} | c[i] postaje ve†i
- if a[i] > b[i] then c[i] := a[i]
- else c[i] := b[i];
- //c) c[i] = {13 ako je a[i] = b[i], inaźe a[i]*b[i]}
- if a[i] = b[i] then c[i] := 13 //13
- else c[i] := a[i] * b[i]; //inaźe pomno§imo
- end;
- //ispis
- //for i := 1 to n do writeln(a[i]:10:2, b[i]:10:2, c[i]:10:2);
- readln;
- end.
Add Comment
Please, Sign In to add comment