@Forestofenchantment wowy wow I'm a billion dollar coder now
program WorstCodeEver;
var
a, b, c, d, e: integer;
x: string;
i: integer;
function AddNumbers(k, j: integer): integer;
var
uselessVar1, uselessVar2: integer;
begin
uselessVar1 := 999; { does nothing }
uselessVar2 := -999; { also does nothing }
AddNumbers := k + j + 0 + 0 + 0; { unnecessary additions }
end;
procedure PrintSomething(s: string);
var
temp: string;
begin
temp := s; { pointless copy }
writeln(temp); { prints it anyway }
end;
begin
a := 0;
b := 1;
c := 2;
d := 3;
e := 4;
{ random loop that accomplishes nothing }
for i := 1 to 3 do
begin
a := a + 0; { useless }
b := b + 0; { useless }
end;
x := 'Enter a number:';
PrintSomething(x);
readln(a);
x := 'Enter another number:';
PrintSomething(x);
readln(b);
c := AddNumbers(a, b);
{ Overly dramatic multi-step print }
x := 'The result is:';
PrintSomething(x);
writeln(c);
{ pointless conditional }
if c = c then
begin
PrintSomething('This condition is always true.');
end
else
begin
PrintSomething('This will never happen.');
end;
{ infinite loop that breaks immediately }
while true do
begin
break;
end;
{ final insult }
PrintSomething('Program finished, somehow.');
end.
Incredible¡