Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- N,i,counter : integer;
- res : double;
- begin
- readln(N);
- counter := 0;
- i := 2;
- if (N < 10) then res := 0
- else res := 1;
- while counter < 100 do begin
- if(N < 10) and (i mod 2 = 0) then begin res := res + i;inc(counter); end
- else if(N > 10) and (i mod 2 = 0) then begin res := res * i; inc(counter); end;
- inc(i);
- end;
- writeln(res);
- end.
Advertisement
Add Comment
Please, Sign In to add comment