Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- n, i, k, m: integer;
- x,s, a: real;
- begin
- // 2*1/5 4/5 6/5 2*i/5
- //--1---
- readln(n);
- for i := 1 to n do
- begin
- x := (2 * i / 5);
- writeln(x);
- end;
- //---2----
- readln(a);
- i := 1;
- x := (2 * i / 5);
- s := 0;
- while x < a do
- begin
- writeln(x);
- s := s + x;
- i := i + 1;
- x := (2 * i / 5);
- end;
- writeln(s);
- //---3-----
- readln(a);
- i := 1;
- x := (2 * i / 5);
- while x <= a do
- begin
- i := i + 1;
- x := (2 * i / 5);
- end;
- writeln(x);
- end.
Advertisement
Add Comment
Please, Sign In to add comment