Skip to content

Commit f94e2f0

Browse files
authored
Changed <samp> to <pre>
Changed the <samp> tags to <pre> in all phrases tags. This was done in order to reflect in a better way the continuos spaces found in some phrases,
1 parent 452b474 commit f94e2f0

4 files changed

Lines changed: 29 additions & 30 deletions

File tree

caesar1.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@
2525
echo "</tr>\n";
2626
echo "<tr>\n";
2727
echo " <td class=\"table-dark text-right\">$l_alphabet:</td>\n";
28-
echo " <td><samp>";
28+
echo " <td><pre>";
2929
for ($i=65; $i<=90; $i++) {
3030
echo chr($i);
3131
}
32-
echo "</samp></td>\n";
32+
echo "</pre></td>\n";
3333
echo "</tr>\n";
3434
echo "<tr>\n";
3535
echo " <td class=\"table-dark text-right\">$l_newalphabet:</td>\n";
36-
echo " <td><samp>";
36+
echo " <td><pre>";
3737
for ($i=65; $i<=90; $i++) {
3838
$position=$i;
3939
if ($i>(90-$enckey)) { $position=($i+$enckey-(26+$enckey)); }
4040
$letter=$position+$enckey;
4141
echo chr($letter);
4242
}
43-
echo "</samp></td>\n";
43+
echo "</pre></td>\n";
4444
echo "</tr>\n";
4545
echo "<tr>\n";
4646
echo " <td class=\"bg-warning text-right\"><strong>$l_phrase:</strong></td>\n";
47-
echo " <td><samp>$phrase</samp></td>";
47+
echo " <td><pre>$phrase</pre></td>";
4848
echo "</tr>\n";
4949
echo "<tr>\n";
5050
echo " <td class=\"bg-success text-right\"><strong>$l_newphrase:</strong></td>\n";
51-
echo " <td><samp>";
51+
echo " <td><pre>";
5252
$counter=0;
5353
while ($counter < strlen($phrase)) {
5454
$position = ord($phrase[$counter]);
@@ -62,11 +62,11 @@
6262
echo chr($position);
6363
$counter++;
6464
}
65-
echo "</samp></td>\n";
65+
echo "</pre></td>\n";
6666
echo "</tr>\n";
6767
echo "<tr>\n";
6868
echo " <td class=\"bg-danger text-right\"><strong>$l_inverted:</strong></td>\n";
69-
echo " <td><samp>";
69+
echo " <td><pre>";
7070
$counter=0;
7171
while ($counter < strlen($phrase)) {
7272
$position = ord($phrase[$counter]);
@@ -80,7 +80,7 @@
8080
echo chr($position);
8181
$counter++;
8282
}
83-
echo "</samp></td>\n";
83+
echo "</pre></td>\n";
8484
echo "</tr>\n";
8585
echo "</table>\n";
8686
echo "</div>\n";

caesar2.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@
2525
echo "</tr>\n";
2626
echo "<tr>\n";
2727
echo " <td class=\"table-dark text-right\">$l_alphabet:</td>\n";
28-
echo " <td><samp>";
28+
echo " <td><pre>";
2929
for ($i=65; $i<=90; $i++) {
3030
echo chr($i);
3131
}
32-
echo "</samp></td>\n";
32+
echo "</pre></td>\n";
3333
echo "</tr>\n";
3434
echo "<tr>\n";
3535
echo " <td class=\"table-dark text-right\">$l_newalphabet:</td>\n";
36-
echo " <td><samp>";
36+
echo " <td><pre>";
3737
for ($i=65; $i<=90; $i++) {
3838
$position=$i;
3939
if ($i>(90-$enckey)) { $position=($i+$enckey-(26+$enckey)); }
4040
$letter=$position+$enckey;
4141
echo chr($letter);
4242
}
43-
echo "</samp></td>\n";
43+
echo "</pre></td>\n";
4444
echo "</tr>\n";
4545
echo "<tr>\n";
4646
echo " <td class=\"bg-warning text-right\"><strong>$l_phrase:</strong></td>\n";
47-
echo " <td><samp>$phrase</samp></td>";
47+
echo " <td><pre>$phrase</pre></td>";
4848
echo "</tr>\n";
4949
echo "<tr>\n";
5050
echo " <td class=\"bg-success text-right\"><strong>$l_newphrase:</strong></td>\n";
51-
echo " <td><samp>";
51+
echo " <td><pre>";
5252
$counter=0;
5353
$enckeyesimo = 0;
5454
while ($counter < strlen($phrase)) {
@@ -73,11 +73,11 @@
7373
$counter++;
7474
$enckeyesimo++;
7575
}
76-
echo "</samp></td>\n";
76+
echo "</pre></td>\n";
7777
echo "</tr>\n";
7878
echo "<tr>\n";
7979
echo " <td class=\"bg-danger text-right\"><strong>$l_inverted:</strong></td>\n";
80-
echo " <td><samp>";
80+
echo " <td><pre>";
8181
$counter=0;
8282
$enckeyesimo = 0;
8383
while ($counter < strlen($phrase)) {
@@ -92,13 +92,12 @@
9292
}
9393
echo chr($position);
9494
} else {
95-
// echo "<font color=\"red\">#</font>";
9695
$enckeyesimo = -1;
9796
}
9897
$counter++;
9998
$enckeyesimo++;
10099
}
101-
echo "</samp></td>\n";
100+
echo "</pre></td>\n";
102101
echo "</tr>\n";
103102
echo "</table>\n";
104103
echo "</div>\n";

rot13.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@
1616
echo "</tr>\n";
1717
echo "<tr>\n";
1818
echo " <td class=\"table-dark text-right\">$l_alphabet:</td>\n";
19-
echo " <td><samp>";
19+
echo " <td><pre>";
2020
for ($i=65; $i<=90; $i++) {
2121
echo chr($i);
2222
}
23-
echo "</samp></td>\n";
23+
echo "</pre></td>\n";
2424
echo "</tr>\n";
2525
echo "<tr>\n";
2626
echo " <td class=\"table-dark text-right\">$l_newalphabet:</td>\n";
27-
echo " <td><samp>";
27+
echo " <td><pre>";
2828
for ($i=65; $i<=90; $i++) {
2929
$position=$i;
3030
if ($i>65+12) { $position=$i-26; }
3131
$letter=$position+13;
3232
echo chr($letter);
3333
}
34-
echo "</samp></td>\n";
34+
echo "</pre></td>\n";
3535
echo "</tr>\n";
3636
echo "<tr>\n";
3737
echo " <td class=\"bg-warning text-right\"><strong>$l_phrase:</strong></td>\n";
38-
echo " <td><samp>$phrase</samp></td>";
38+
echo " <td><pre>$phrase</pre></td>";
3939
echo "</tr>\n";
4040
echo "<tr>\n";
4141
echo " <td class=\"bg-success text-right\"><strong>$l_newphrase:</strong></td>\n";
42-
echo " <td><samp>";
42+
echo " <td><pre>";
4343
$counter=0;
4444
while ($counter < strlen($phrase)) {
4545
$position = ord($phrase[$counter]);
@@ -53,7 +53,7 @@
5353
echo chr($position);
5454
$counter++;
5555
}
56-
echo "</samp></td>\n";
56+
echo "</pre></td>\n";
5757
echo "</tr>\n";
5858
echo "</table>\n";
5959
echo "</div>\n";

trasposition.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
echo "</tr>\n";
6868
echo "<tr>\n";
6969
echo " <td class=\"bg-success text-right\"><strong>$l_newphrase:</strong></td>\n";
70-
echo " <td><samp>";
70+
echo " <td><pre>";
7171
$columns = $enckey;
7272
while ($columns >= 1) {
7373
$rows = 1;
@@ -83,7 +83,7 @@
8383
}
8484
$columns--;
8585
}
86-
echo "</samp></td>\n";
86+
echo "</pre></td>\n";
8787
echo "</tr>\n";
8888
while ((strlen($phrase) % $enckey) != 0) {
8989
$phrase .= " ";
@@ -105,7 +105,7 @@
105105
}
106106
echo "<tr>\n";
107107
echo " <td class=\"bg-danger text-right\"><strong>$l_inverted:</strong></td>\n";
108-
echo " <td><samp>";
108+
echo " <td><pre>";
109109
$rows = 1;
110110
$columns = 1;
111111
$counter = 0;
@@ -124,7 +124,7 @@
124124
}
125125
$counter++;
126126
}
127-
echo "</samp></td>\n";
127+
echo "</pre></td>\n";
128128
echo "</tr>\n";
129129
echo "</table>\n";
130130
echo "</div>\n";

0 commit comments

Comments
 (0)