Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Hello;
- var
- i,j,k,n,r,p: integer;
- begin
- read(k,p,r);
- n:= 0;
- j:= 0;
- while (j < r) do
- begin
- writeln('Uso sam u while i vrednost k je');
- writeln(k);
- k:= n + 2*k + abs(j-5);
- n:= n + 1;
- j:= j + 2;
- end;
- i:= 0;
- repeat
- writeln('Uso sam u repeat i vrednost k je');
- writeln(k);
- k:= k + sqr(i-1) + 2*n;
- writeln('Posle izracunavanja k je');
- writeln(k);
- for j:= r downto p do
- if (j mod 2 = 0)
- then
- k:= n + 3*(j+1) + k
- else
- k:= n + 4*j + k;
- writeln('Posle celog fora, vise okretanja k je');
- writeln(k);
- i:= i + 2;
- until i>=p;
- writeln(k);
- end.
- //Sajt https://www.onlinegdb.com/online_pascal_compiler
- //dole u konzolu 2 pa enter, 3 pa enter, 4 pa enter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement