kestutis

1 lygis | 2 pamokėlė | 5. Geriausia klasė

Dec 31st, 2013
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.38 KB | None | 0 0
  1. var a, b, c, d, max : real;
  2. begin
  3.   WriteLn('Įveskite klasių vidurkius:');
  4.   Readln(a, b, c, d);
  5.  
  6.   max := a;
  7.   if b > max then
  8.     max := b;
  9.   if c > max then
  10.     max := c;
  11.   if d > max then
  12.     max := d;
  13.  
  14.   writeln('Didžiausias vidurkis: ', max:2:1);
  15.   writeln('Kitų klasių vidurkiai skiriasi: ', max-a:2:1, ', ', max-b:2:1, ', ', max-c:2:1, ', ', max-d:2:1);
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment