kestutis

1 lygis | 2 pamokėlė | 8. Skaičiai

Dec 31st, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.38 KB | None | 0 0
  1. var
  2.     a, b, c:integer;
  3. begin
  4.     WriteLn('Įveskite a reikšmę');
  5.     readln(a);
  6.     writeln('Įveskite b reikšmę');
  7.     readln(b);
  8.     writeln('Įveskite c reikšmę');
  9.     readln(c);
  10.  
  11.     if a mod 3 = 0 then
  12.         writeln('Atsakymas: ', a)
  13.     else if b mod 3 = 0 then
  14.         writeln('Atsakymas: ', b)
  15.     else if c mod 3 = 0 then
  16.         writeln('Atsakymas: ', c)
  17.     else
  18.         writeln('Atsakymas: Nėra');
  19. end.
Advertisement
Add Comment
Please, Sign In to add comment