Using some basic Arithmetic operators and StrToIntDef, div, mod.
Smart pascal source code
{ filename: unit1.pas }
var
n, i: Integer;
begin
n := 10;
n := n * 10;
for i := 1 to n do
begin
if (i mod 3) = 0 then Continue;
if (i mod 5) = 1 then Continue;
if (i mod 7) = 0 then Continue;
if i > n div 2 then Break;
Writeln(IntToStr(i));
end;
// it will output:
{2,4,5,8,10,13,17,19,20,22,23,25,29,32,34,37,38,40,43,44,47,50}
n := 142;
Writeln('142 div 10 = ' + IntToStr(142 div 10)); // 14
Writeln('142 mod 10 = ' + IntToStr(142 mod 10)); // 2
i := 10;
Writeln(IntToStr(n + i)); // 100 + 10 = 110
Writeln(IntToStr(n - i)); // 100 - 10 = 90
Writeln(IntToStr(n + n * i - i)); // (100 + 100 * 10 - 10) = 1090
Writeln(IntToStr((n + n) * (i - i))); // (100+100) x (10-10) = 0
Writeln(IntToStr((n + i) * (n - i))); // (100+10) x (100-10) = 9900
Writeln(IntToStr(n + n div i)); // 100 + (100 / 10) = 110
Writeln(IntToStr(n div i + n)); // (100 / 10) + 100 = 110
{ filename: unit2.pas }
var a := StrToIntDef(w3_Prompt('Enter 1st number','0'),0);
var b := StrToIntDef(w3_Prompt('Enter 2nd number','0'),0);
WriteLn(Format('%d + %d = %d', [a, b, a + b]));
WriteLn(Format('%d - %d = %d', [a, b, a - b]));
WriteLn(Format('%d * %d = %d', [a, b, a * b]));
WriteLn(Format('%d / %d = %d', [a, b, a div b]));
WriteLn(Format('%d mod %d = %d', [a, b, a mod b]));
WriteLn(Format('%d ^ %d = %d', [a, b, Trunc(Power(a, b))]));
var n = 0;
var i = 0;
n = 10;
n*=10;
var $temp1;
for(i=1,$temp1=n;i<=$temp1;i++) {
if (!(i%3)) {
continue;
}
if (i%5==1) {
continue;
}
if (!(i%7)) {
continue;
}
if (i>($Div(n,2))) {
break;
}
WriteLn(i.toString());
}
n = 142;
WriteLn("142 div 10 = 14");
WriteLn("142 mod 10 = 2");
i = 10;
WriteLn((n+i).toString());
WriteLn((n-i).toString());
WriteLn((n+n*i-i).toString());
WriteLn(((n+n)*(i-i)).toString());
WriteLn(((n+i)*(n-i)).toString());
WriteLn((n+($Div(n,i))).toString());
WriteLn((($Div(n,i))+n).toString());
{ Reference to unit2.pas}
function StrToIntDef(v,d) { var r=parseInt(v,10); return isNaN(r)?d:r }
function $Div(a,b) { var r=a/b; return (r>=0)?Math.floor(r):Math.ceil(r) }
var a = 0, b = 0;
a = StrToIntDef(w3_Prompt("Enter 1st number","0"),0);
b = StrToIntDef(w3_Prompt("Enter 2nd number","0"),0);
WriteLn((a.toString()+" + "+b.toString()+" = "+(a+b).toString()));
WriteLn((a.toString()+" - "+b.toString()+" = "+(a-b).toString()));
WriteLn((a.toString()+" * "+b.toString()+" = "+(a*b).toString()));
WriteLn((a.toString()+" \/ "+b.toString()+" = "+($Div(a,b)).toString()));
WriteLn((a.toString()+" mod "+b.toString()+" = "+(a%b).toString()));
WriteLn((a.toString()+" ^ "+b.toString()+" = "+Trunc(Math.pow(a,b)).toString()));