23.05
This commit is contained in:
36
Zadania/Z71 - ile liczb/index.php
Normal file
36
Zadania/Z71 - ile liczb/index.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<!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>Z71 - Ile liczb</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Zadanie Z71</h1>
|
||||||
|
<h2>Autor: Jakub Grzegorczyk</h2>
|
||||||
|
</header>
|
||||||
|
<div class="box">
|
||||||
|
Napisz program, który dla podanej liczby całkowitej większej od zera odpowie ile ma ona cyfr.
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<form action="index.php" method="post">
|
||||||
|
<label for="a">Podaj liczbę: </label><br>
|
||||||
|
<input type="number" name="a" id="a"><br><br>
|
||||||
|
<button type="submit">Wyślij</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<?php
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
$a = (int)htmlspecialchars($_POST['a']);
|
||||||
|
$liczbaCyfr = strlen($a);
|
||||||
|
echo "Liczba cyfr: $liczbaCyfr";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
51
Zadania/Z71 - ile liczb/style.css
Normal file
51
Zadania/Z71 - ile liczb/style.css
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
background: #ffffff;
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
border: 2px solid black;
|
||||||
|
border-radius: 1em;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
border: 2px solid black;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 1em;
|
||||||
|
margin: 10px 0 10px 0;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 5px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box p {
|
||||||
|
padding: 10px 15px 20px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box h3 {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
42
Zadania/Z76 - Od A do B/index.php
Normal file
42
Zadania/Z76 - Od A do B/index.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<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>Z76 - Od A do B</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Zadanie Z76</h1>
|
||||||
|
<h2>Autor: Jakub Grzegorczyk</h2>
|
||||||
|
</header>
|
||||||
|
<div class="box">
|
||||||
|
<p>Napisz program, który dla podanych liczb całkowitych A i B wyświetla wszystkie liczby całkowite z przedziału od A do B oddzielone średnikami.</p>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<form action="index.php" method="post">
|
||||||
|
<label for="a">Wprowadź liczbę A: </label><br>
|
||||||
|
<input type="number" name="a" id="a"><br>
|
||||||
|
<label for="b">Wprowadź liczbę B:</label><br>
|
||||||
|
<input type="number" name="b" id="b"><br><br>
|
||||||
|
<button type="submit">Wyślij</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<?php
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
$a = (int)htmlspecialchars($_POST['a']);
|
||||||
|
$b = (int)htmlspecialchars($_POST['b']);
|
||||||
|
$liczby = [];
|
||||||
|
for ($i = $a; $i <= $b; $i++) {
|
||||||
|
$liczby[] = $i;
|
||||||
|
}
|
||||||
|
echo implode('; ', $liczby);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
50
Zadania/Z76 - Od A do B/style.css
Normal file
50
Zadania/Z76 - Od A do B/style.css
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
background: #ffffff;
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
border: 2px solid black;
|
||||||
|
border-radius: 1em;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 5px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
border: 2px solid black;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 1em;
|
||||||
|
margin: 10px 0 10px 0;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box h3 {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
47
Zadania/Z77 - Od mniejszej do większej/index.php
Normal file
47
Zadania/Z77 - Od mniejszej do większej/index.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<!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>Z77 - Od mniejszej do większej</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Zadanie Z77</h1>
|
||||||
|
<h2>Autor: Jakub Grzegorczyk</h2>
|
||||||
|
</header>
|
||||||
|
<div class="box">
|
||||||
|
<p>Napisz program, który dla podanych liczb całkowitych A i B wyświetla liczby od A do B, gdy A < B, lub od B do A, gdy B < A.</p>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<form action="index.php" method="post">
|
||||||
|
<label for="a">Wprowadź liczbę A:</label><br>
|
||||||
|
<input type="number" name="a" id="a"><br>
|
||||||
|
<label for="b">Wprowadź liczbę B:</label><br>
|
||||||
|
<input type="number" name="b" id="b"><br><br>
|
||||||
|
<button type="submit">Wyślij</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<?php
|
||||||
|
if (isset($_POST['a']) && isset($_POST['b'])) {
|
||||||
|
$a = (int)htmlspecialchars($_POST['a']);
|
||||||
|
$b = (int)htmlspecialchars($_POST['b']);
|
||||||
|
if ($a < $b) {
|
||||||
|
for ($i = $a; $i <= $b; $i++) {
|
||||||
|
echo "$i ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($b < $a) {
|
||||||
|
for ($i = $b; $i <= $a; $i++) {
|
||||||
|
echo "$i ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
50
Zadania/Z77 - Od mniejszej do większej/style.css
Normal file
50
Zadania/Z77 - Od mniejszej do większej/style.css
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
background: #ffffff;
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
border: 2px solid black;
|
||||||
|
border-radius: 1em;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
div {
|
||||||
|
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 5px;
|
||||||
|
width: 30%;
|
||||||
|
border: black 2px solid;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: Verdana, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
border: 2px solid black;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 1em;
|
||||||
|
margin: 10px 0 10px 0;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 3px 3px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box h3 {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user