program FibonacciSequence;varm, f0, f1, f2, f: integer;beginwriteln('Enter a number m:');readln(m);
f0 := 0;f1 := 1;f2 := 1;
while f2 <= m dobeginf := f1 + f2;f0 := f1;f1 := f2;f2 := f;end;
writeln('The first Fibonacci number greater than ', m, ' is ', f);end.
program FibonacciSequence;
var
m, f0, f1, f2, f: integer;
begin
writeln('Enter a number m:');
readln(m);
f0 := 0;
f1 := 1;
f2 := 1;
while f2 <= m do
begin
f := f1 + f2;
f0 := f1;
f1 := f2;
f2 := f;
end;
writeln('The first Fibonacci number greater than ', m, ' is ', f);
end.