Guest User

no limit

a guest
Oct 28th, 2015
99
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. N,i,counter : integer;
  3. res : double;
  4. begin
  5.   readln(N);
  6.  
  7.   counter := 0;
  8.   i := 2;
  9.   if (N < 10) then res := 0
  10.   else res := 1;
  11.  
  12.   while counter < 100 do begin
  13.     if(N < 10) and (i mod 2 = 0) then begin res := res + i;inc(counter); end
  14.     else if(N > 10) and (i mod 2 = 0) then begin res := res * i; inc(counter); end;
  15.     inc(i);
  16.   end;
  17.  
  18.   writeln(res);
  19. end.
Advertisement
Add Comment
Please, Sign In to add comment