This commit is contained in:
jakub
2025-10-31 22:15:27 +01:00
parent 1c1e77cf14
commit 1f7ddfd4a0
18 changed files with 3149 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z81 - Odwrócona Piramida</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z81</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby całkowitej A wyświetla piramidę znaków X o ilości wierszy równej A (maksymalna wartość A = 50).</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj liczbę A:</label>
<input type="number" name="a" id="a" max="50" min="1" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = (int)htmlspecialchars($_POST['a']);
echo '<div class="box" style="">';
echo "A: $a <br>";
for ($i = $a; $i >= 1; $i--) {
echo str_repeat('X', $i);
echo '<br>';
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,54 @@
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z82 - Prostoką† X</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z82</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla danej liczby A i B wyświetla następujący blok znaków.</p>
<pre>
Przykład:
A ilość znaków w wierszu: 5
B ilość wierszy: 3
Wynik
XXXXX
XXXXX
XXXXX
</pre>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj A:</label>
<input type="text" name="a" id="a">
<label for="b">Podaj B:</label>
<input type="text" name="b" id="b">
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
$b = htmlspecialchars($_POST['b']);
echo '<div class="box">'
. "A - ilość znaków w wierszu: $a <br>"
. "B - ilość wierszy: $b <br>";
for ($i = 0; $i < $b; $i++) {
echo str_repeat('X', $a);
echo '<br>';
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,80 @@
<?php
session_start();
if (!isset($_SESSION['isStarted'])) {
$_SESSION['isStarted'] = false;
}
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z84 - Samochód</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z84</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który symuluje auto sterowane za pomocą poleceń konsoli. Program powinien posiadać następujące komendy:</p>
<ul>
<li>Start — uruchamia auto</li>
<li>Stop — zatrzymuje auto</li>
<li>Koniec — kończy działanie programu</li>
<li>Pomoc — wyświetla pomoc z opisem poszczególnych komend</li>
</ul>
<p>Program powinien umieć reagować na sytuacje wyjątkowe. Ponowne użycie komendy „Start” jeśli auto jest uruchomione wyświetla komunikat w stylu: „przecież już jadę ;)”. W przypadku polecenia „Stop” jeśli samochód już stoi zobaczymy komunikat w stylu „O co chodzi? Przecież stoję???”. W przypadku wydania nieznanej komendy należy wyświetlić komunikat w stylu „Nie znam tej komendy”. Program powinien działać w pętli, aż do wydania komendy „Koniec”.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Wpisz komendę: Start, Stop, Koniec, Pomoc</label>
<input type="text" name="a" id="a">
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = strtolower(htmlspecialchars($_POST['a']));
echo '<div class="box">';
echo '<b>';
switch ($a) {
case 'start':
if (!$_SESSION['$isStarted']) {
$_SESSION['$isStarted'] = true;
echo 'Samochód uruchomiony!';
} else { echo 'Przecież już jadę :)'; }
break;
case 'stop':
if ($_SESSION['$isStarted']) {
$_SESSION['$isStarted'] = false;
echo 'Samochód zatrzymany!';
} else { echo 'O co chodzi? Przecież stoję???';}
break;
case 'pomoc':
echo 'Dostępne komendy: <br>' .
'Start - uruchamia auto <br>' .
'Stop - zatrzymuje auto <br>' .
'Koniec - kończy działanie programu <br>' .
'Pomoc - wyświetla tę wiadomość';
break;
case 'koniec':
echo 'Zamykanie programu...';
session_destroy();
session_start();
$_SESSION['isStarted'] = false;
break;
default:
echo 'Nie znam tej komendy';
}
echo '</b>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,53 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z85 - N Pseudolosowych</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z85</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla trzech liczb całkowitym n, min, max wyświetla n liczb pseudolosowych z zakresu <min, max>.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="n">Podaj N:</label>
<input type="number" name="n" id="n" required>
<label for="min">Podaj Min:</label>
<input type="number" name="min" id="min" required>
<label for="max">Podaj Max:</label>
<input type="number" name="max" id="max" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$n = htmlspecialchars($_POST['n']);
$min = htmlspecialchars($_POST['min']);
$max = htmlspecialchars($_POST['max']);
echo '<div class="box">';
if ($n > 0 && $min < $max) {
echo 'Wylosowane liczby: <b>';
for ($i = 0; $i < $n; $i++) {
echo rand($min, $max) . ', ';
}
echo '</b>';
} else {
echo 'N jest mniejsze od 0 lub max jest mniejsze od min';
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,55 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z86 - Potencjometr</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z86</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby całkowitej a losuje a liczb w zakresie <1, 9>.i wyświetla je na ekranie w postaci: liczba i liczba znaków |.</p>
<pre>
Przykład a=5
Wylosowane liczby: 5 3 6 3 1
5|||||
3|||
6||||||
3|||
1|
</pre>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj A:</label>
<input type="number" name="a" id="a" min="1" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
echo '<div class="box">';
$arr = array();
for ($i = 0; $i < $a; $i++) {
$arr[$i] = rand(1, 9);
}
$arrString = implode(', ', $arr);
echo 'Wylosowane liczby: ' . $arrString . '<br>';
for ($i = 0; $i < $a; $i++) {
echo "$arr[$i] " . str_repeat('| ', $arr[$i]) . '<br>';
}
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,45 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z87 - Suma do A</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z87</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby całkowitej A obliczy sumę liczb od 1 do A włącznie.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="a">Podaj A:</label>
<input type="number" name="a" id="a" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$a = htmlspecialchars($_POST['a']);
echo '<div class="box">';
$suma = 0;
for ($i = 1; $i <= $a; $i++) {
echo $i;
if ($i < $a) { echo ' + '; }
$suma += $i;
}
echo ' = <b>' . $suma . '</b>';
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,51 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z88 - Średnia N liczb</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z88</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który pyta o liczbę całkowitą N, a następnie oblicza sumę i średnią N liczb i wyświetla wynik na ekranie.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="n">Podaj N:</label>
<input type="text" name="n" id="n" required min="1">
<label for="spaced_numbers">Podaj N liczb oddzielonych spacją:</label>
<input type="text" name="spaced_numbers" id="spaced_numbers" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$n = htmlspecialchars($_POST['n']);
$spaced_numbers = htmlspecialchars($_POST['spaced_numbers']);
echo '<div class="box">';
$arr = explode(' ', $spaced_numbers);
$suma = 0;
$liczba = 0;
echo 'Suma liczb w tablicy: <br>';
for ($i = 0; $i < $n; $i++) {
$suma += (int)$arr[$i];
echo $arr[$i];
if ($i < $n - 1) { echo ' + '; }
}
echo " = <b>$suma</b><br>";
echo "Średnia: <b>" . $suma / $n . "</b><br>";
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,41 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z89 - N potęg dwójki</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z89</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej liczby całkowitej N oblicza N kolejnych potęg dwójki.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="n">Podaj N:</label>
<input type="text" name="n" id="n">
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$n = htmlspecialchars($_POST['n']);
echo '<div class="box">';
for ($i = 1; $i <= $n; $i++) {
echo "2<sup>$i</sup> = <b>" . pow(2, $i) . "</b><br>";
}
echo '</div>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}

View File

@@ -0,0 +1,47 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Z90 - Podzielne przez K</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z90</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla podanej wartości zmiennej n i k wyświetla wszystkie liczby z przedziału <1, n> podzielne przez k.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="n">Podaj N:</label>
<input type="number" name="n" id="n" required>
<label for="k">Podaj K:</label>
<input type="number" name="k" id="k" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$n = htmlspecialchars($_POST['n']);
$k = htmlspecialchars($_POST['k']);
echo '<div class="box">';
$arr = array();
for ($i = 1; $i <= $n; $i++) {
if ($i % $k == 0) {$arr[] = $i;}
}
echo 'N = <b>' . $n . '</b><br>';
echo 'K = <b>' . $k . '</b><br>';
echo 'Liczby podzielne przez ' . $k . ' to : <b>' . implode(', ', $arr) . '</b>';
}
?>
</body>
</html>

View File

@@ -0,0 +1,298 @@
/* === UNIVERSAL SCHOOL TEMPLATE CSS (BLACK & WHITE EDITION) === */
/* clean, modern, and copy-paste friendly for all projects */
/* === RESET === */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* === VARIABLES === */
:root {
--accent: #000;
--border: #000;
--bg: #fff;
--bg-alt: #f7f7f7;
--text: #111;
--shadow: rgba(0, 0, 0, 0.15) 3px 3px 6px;
--radius: 1em;
--max-width: 1300px;
}
/* === PAGE === */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Verdana, sans-serif;
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
color: var(--text);
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
line-height: 1.6;
}
/* === HEADER === */
header {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 20px 30px;
box-shadow: var(--shadow);
background: var(--bg);
width: 95%;
max-width: var(--max-width);
text-align: center;
margin-top: 25px;
transition: box-shadow 0.3s ease, transform 0.2s ease;
}
header:hover {
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
transform: translateY(-2px);
}
header h1 {
font-size: 2.2rem;
}
header h2 {
margin-top: 0.5rem;
font-weight: 400;
font-size: 1.1rem;
color: #444;
}
/* === BOX === */
.box {
border: 2px solid var(--border);
border-radius: var(--radius);
padding: 25px 35px;
margin-top: 25px;
background: var(--bg);
box-shadow: var(--shadow);
width: 95%;
max-width: var(--max-width);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.box:hover {
transform: translateY(-2px);
box-shadow: rgba(0, 0, 0, 0.25) 4px 4px 10px;
}
/* === TEXT ELEMENTS === */
p {
margin-bottom: 1rem;
}
.box > p:last-child {
margin-bottom: 0;
}
h1, h2, h3, h4 {
margin-bottom: 0.5rem;
font-weight: 600;
}
a {
color: #000;
text-decoration: underline;
font-weight: 500;
}
a:hover {
opacity: 0.7;
}
/* === LISTS === */
ul, ol {
margin: 1rem 0 1rem 1.5rem;
}
li {
margin-bottom: 0.4rem;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
background: var(--bg);
border: 2px solid var(--border);
border-radius: 0.6em;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td {
padding: 10px 12px;
border-bottom: 1px solid #ccc;
}
th {
background: var(--bg-alt);
font-weight: bold;
text-align: left;
}
tr:hover {
background: #f2f2f2;
}
/* === FORMS === */
form {
display: flex;
flex-direction: column;
gap: 1.4rem;
}
.box:has(> form) {
padding: 35px 35px;
}
fieldset {
border: 2px solid var(--border);
border-radius: 0.8em;
padding: 1.2rem 1.5rem;
background: var(--bg-alt);
}
legend {
font-weight: bold;
color: #000;
padding: 0 0.4rem;
font-size: 1.05rem;
}
label {
font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
width: 100%;
font-size: 1rem;
margin-top: 6px;
margin-bottom: 8px;
border: 2px solid var(--border);
border-radius: 0.5em;
padding: 0.4rem 0.5rem;
transition: all 0.2s ease;
background: var(--bg);
}
textarea {
resize: vertical;
min-height: 100px;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: #000;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
background: #f9f9f9;
}
input[type="radio"],
input[type="checkbox"] {
accent-color: #000;
transform: scale(1.2);
margin-right: 0.3rem;
}
/* === BUTTONS === */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
padding: 10px 20px;
border: 2px solid var(--border);
border-radius: 0.5em;
font-weight: bold;
font-size: 1rem;
background: linear-gradient(180deg, #fff 0%, #f2f2f2 100%);
cursor: pointer;
transition: all 0.2s ease;
align-self: flex-start;
}
button {
width: 100%;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
background: #eaeaea;
box-shadow: rgba(0, 0, 0, 0.25) 3px 3px 6px;
transform: translateY(-2px);
}
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
transform: translateY(0);
box-shadow: rgba(0, 0, 0, 0.15) 1px 1px 3px;
background: #f7f7f7;
}
/* === HR, CODE, ETC. === */
hr {
border: 0;
border-top: 2px solid var(--border);
margin: 1.5rem 0;
}
img {
max-width: 100%;
border-radius: 0.5em;
}
code, pre {
background: #f4f4f4;
border: 1px solid #ccc;
border-radius: 0.4em;
padding: 0.3em 0.5em;
font-family: "Courier New", monospace;
}
pre {
padding: 1em;
overflow-x: auto;
}
/* === RESPONSIVE === */
@media (max-width: 900px) {
header, .box {
width: 95%;
padding: 20px;
}
button {
width: 100%;
}
textarea {
width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.7rem;
}
header h2 {
font-size: 0.95rem;
}
}