Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pcl/programs/Caesar_cipher.pcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ begin
else if (c >= 'a') and (c <= 'z') then
shift := chr(((ord(c) - 32 - ord('A') + k) mod 26) + ord('A'))
else
shift := c;
shift := c
end;

begin
Expand All @@ -29,7 +29,7 @@ begin
if (key < 1) or (key > 25) then
begin
writeString("Invalid key! Key must be a number between 1 and 25!!\n");
valid_key := false;
valid_key := false
end
else
valid_key := true;
Expand All @@ -45,13 +45,13 @@ begin
begin
ch := plaintext[i];
ciphertext[i] := shift(ch, key);
i := i + 1;
i := i + 1
end;

ciphertext[i] := '\0';

writeString("Ciphertext: ");
writeString(ciphertext);
writeString("\n");
end;
writeString("\n")
end
end.
2 changes: 1 addition & 1 deletion pcl/programs/bsort.pcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ program bsort;
writeInteger(x[i]);
i := i+1
end;
writeString("\n");
writeString("\n")
end;

var i : integer;
Expand Down
2 changes: 1 addition & 1 deletion pcl/programs/edit_distance.pcl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ begin
j := j + 1
end;

i := i + 1;
i := i + 1
end;

writeString("\n\nEdit Distance is: ");
Expand Down
4 changes: 2 additions & 2 deletions pcl/programs/palindrome.pcl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ begin
begin
if s[i] <> s[l - i - 1] then
begin
result := 0;
result := 0
end;

i := i + 1
end;
end
end;

begin
Expand Down
4 changes: 2 additions & 2 deletions pcl/programs/primes.pcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ begin
if limit >= 3 then
begin
counter := counter + 1;
writeString("3\n");
writeString("3\n")
end;
number := 6;
while number <= limit do
Expand All @@ -59,7 +59,7 @@ begin
begin
counter := counter + 1;
writeInteger(number+1);
writeString("\n");
writeString("\n")
end;
number := number + 6
end;
Expand Down