Hi I've done these lines of code on freepascal:
type bigNum=string;
function bigMod(a:bigNum;b:longint):longint;
var i,hold:longint;
begin
hold:=0;
for i:=1 to length(a) do
hold:=(ord(a[i])-48+hold*10)mod b;
bigMod:=hold;
end;
uses sysutils;
var a,i,n:longint;
begin
readln(n);
a:=1;
for i:=1 to n-2 do
a:=a*2;
IntToStr(a);
writeln(bigMod(bigMod(a,n),1000000000));
end.
but when I run it, it said 'BEGIN' expected but 'USES' found, what should I do to fix it? if i change 'BEGIN' on top of 'USES' its will be another error