SHARE
TWEET

dsfs

allekco Oct 23rd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.     a, num, i, key, marker: integer;
  3. begin
  4.     readln(num);
  5.     a := num;
  6.     key := 0;
  7.     i := 1;
  8.     while i <= 3 do
  9.     begin
  10.         marker := a mod 10;
  11.         if marker = 1 then key := 1;
  12.         a := a div 10;
  13.         i := i + 1;
  14.     end;
  15. if key = 1 then writeln(2*num)
  16. else writeln(num*num);
  17. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top