Jater

Fedya_addition_&_multiplication_of_parts

Nov 27th, 2012
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var x,y,i,f,s: integer; b:boolean;
  2. begin
  3.     write('Vvedi chislo: ');
  4.     repeat
  5.         writeLN('chislo vyhodit za diapazon [1000;9999]');
  6.         write('Vvedite korrectnoe chislo: ');
  7.         readLN(x);
  8.     until (x>999)and(x<10000);
  9.     s:=1; f:=x;
  10.     for i:=0 to 3 do
  11.     begin
  12.         y:=f mod 10;
  13.         s:=s*y;
  14.         f:=f div 10;
  15.     end;
  16.     writeLN(s);
  17.     s:=0;
  18.     for i:=0 to 1 do
  19.     begin
  20.         y:=x mod 10;
  21.         s:=s+y;
  22.         x:=x div 10;
  23.     end;
  24.     for i:=0 to 1 do
  25.     begin
  26.         y:=x mod 10;
  27.         f:=f+y;
  28.         x:=x div 10;
  29.     end;
  30.     b:=s=f;
  31.     writeln(b);
  32.     readln;
  33. End.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×