SHARE
TWEET

Untitled

a guest Oct 23rd, 2013 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.   strnum : string;
  3.   i, n, carry : integer;
  4. begin
  5.   strnum := '324587348123462834876945698439561293469213469465345';
  6.  
  7.   carry := 0;
  8.   for i := 1 to length(strnum) do
  9.   begin
  10.     n := ord(strnum[i]) - ord('0'); {переводим символ в число}
  11.     n := n + carry * 10; {если на предыдущем шаге был остаток, добавляем его к числу}
  12.     write(n div 7); {просто для отладки, выводит результат деления}
  13.     carry := n mod 7;
  14.   end;
  15.   writeln;
  16.   writeln('остаток ', carry);
  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