Initial commit
This commit is contained in:
commit
5047f3ed6c
53 changed files with 214 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "ulohy"
|
||||
version = "0.1.0"
|
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
name = "ulohy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
[dependencies]
|
26
LICENSE
Normal file
26
LICENSE
Normal file
|
@ -0,0 +1,26 @@
|
|||
GLWTS(Good Luck With That Shit) Public License
|
||||
Copyright (c) Every-fucking-one, except the Author
|
||||
|
||||
Everyone is permitted to copy, distribute, modify, merge, sell, publish,
|
||||
sublicense or whatever the fuck they want with this software but at their
|
||||
OWN RISK.
|
||||
|
||||
Preamble
|
||||
|
||||
The author has absolutely no fucking clue what the code in this project
|
||||
does. It might just fucking work or not, there is no third option.
|
||||
|
||||
|
||||
GOOD LUCK WITH THAT SHIT PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
|
||||
|
||||
0. You just DO WHATEVER THE FUCK YOU WANT TO as long as you NEVER LEAVE
|
||||
A FUCKING TRACE TO TRACK THE AUTHOR of the original product to blame for
|
||||
or hold responsible.
|
||||
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Good luck and Godspeed.
|
106
src/main.rs
Normal file
106
src/main.rs
Normal file
|
@ -0,0 +1,106 @@
|
|||
pub mod u1;
|
||||
pub mod u2;
|
||||
pub mod u3;
|
||||
pub mod u4;
|
||||
pub mod u5;
|
||||
pub mod u6;
|
||||
pub mod u7;
|
||||
pub mod u8;
|
||||
pub mod u9;
|
||||
pub mod u10;
|
||||
pub mod u11;
|
||||
pub mod u12;
|
||||
pub mod u13;
|
||||
pub mod u14;
|
||||
pub mod u15;
|
||||
pub mod u16;
|
||||
pub mod u17;
|
||||
pub mod u18;
|
||||
pub mod u19;
|
||||
pub mod u20;
|
||||
pub mod u21;
|
||||
pub mod u22;
|
||||
pub mod u23;
|
||||
pub mod u24;
|
||||
pub mod u25;
|
||||
pub mod u26;
|
||||
pub mod u27;
|
||||
pub mod u28;
|
||||
pub mod u29;
|
||||
pub mod u30;
|
||||
pub mod u31;
|
||||
pub mod u32;
|
||||
pub mod u33;
|
||||
pub mod u34;
|
||||
pub mod u35;
|
||||
pub mod u36;
|
||||
pub mod u37;
|
||||
pub mod u38;
|
||||
pub mod u39;
|
||||
pub mod u40;
|
||||
pub mod u41;
|
||||
pub mod u42;
|
||||
pub mod u43;
|
||||
pub mod u44;
|
||||
pub mod u45;
|
||||
pub mod u46;
|
||||
pub mod u47;
|
||||
pub mod u48;
|
||||
|
||||
fn main() {
|
||||
let ulohy = vec![
|
||||
u1::main,
|
||||
u2::main,
|
||||
u3::main,
|
||||
u4::main,
|
||||
u5::main,
|
||||
u6::main,
|
||||
u7::main,
|
||||
u8::main,
|
||||
u9::main,
|
||||
u10::main,
|
||||
u11::main,
|
||||
u12::main,
|
||||
u13::main,
|
||||
u14::main,
|
||||
u15::main,
|
||||
u16::main,
|
||||
u17::main,
|
||||
u18::main,
|
||||
u19::main,
|
||||
u20::main,
|
||||
u21::main,
|
||||
u22::main,
|
||||
u23::main,
|
||||
u24::main,
|
||||
u25::main,
|
||||
u26::main,
|
||||
u27::main,
|
||||
u28::main,
|
||||
u29::main,
|
||||
u30::main,
|
||||
u31::main,
|
||||
u32::main,
|
||||
u33::main,
|
||||
u34::main,
|
||||
u35::main,
|
||||
u36::main,
|
||||
u37::main,
|
||||
u38::main,
|
||||
u39::main,
|
||||
u40::main,
|
||||
u41::main,
|
||||
u42::main,
|
||||
u43::main,
|
||||
u44::main,
|
||||
u45::main,
|
||||
u46::main,
|
||||
u47::main,
|
||||
u48::main,
|
||||
];
|
||||
println!("Zadaj cislo ulohy:");
|
||||
let mut input = String::new();
|
||||
std::io::stdin().read_line(&mut input).unwrap();
|
||||
let i = input.trim().parse::<usize>().unwrap();
|
||||
ulohy[i - 1]()
|
||||
}
|
18
src/u1.rs
Normal file
18
src/u1.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Vytvorte podprogram, ktorý uloží do nového reťazca znaky v opačnom poradí,
|
||||
ako sú v zadanom reťazci. Použite ho v programe, ktorý vyzve užívateľa na
|
||||
zadanie ľubovoľného reťazca a vypíše ho na obrazovku obrátene.
|
||||
*/
|
||||
|
||||
pub fn main() {
|
||||
println!("Zadaj retazec");
|
||||
let mut input = String::new();
|
||||
std::io::stdin().read_line(&mut input).unwrap();
|
||||
println!("opacny retazec: {}", opacne_poradie(&input));
|
||||
input.clear();
|
||||
|
||||
}
|
||||
|
||||
fn opacne_poradie(input: &String) -> String {
|
||||
input.chars().into_iter().rev().collect()
|
||||
}
|
1
src/u10.rs
Normal file
1
src/u10.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u11.rs
Normal file
1
src/u11.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u12.rs
Normal file
1
src/u12.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u13.rs
Normal file
1
src/u13.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u14.rs
Normal file
1
src/u14.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u15.rs
Normal file
1
src/u15.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u16.rs
Normal file
1
src/u16.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u17.rs
Normal file
1
src/u17.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u18.rs
Normal file
1
src/u18.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u19.rs
Normal file
1
src/u19.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u2.rs
Normal file
1
src/u2.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u20.rs
Normal file
1
src/u20.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u21.rs
Normal file
1
src/u21.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u22.rs
Normal file
1
src/u22.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u23.rs
Normal file
1
src/u23.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u24.rs
Normal file
1
src/u24.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u25.rs
Normal file
1
src/u25.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u26.rs
Normal file
1
src/u26.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u27.rs
Normal file
1
src/u27.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u28.rs
Normal file
1
src/u28.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u29.rs
Normal file
1
src/u29.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u3.rs
Normal file
1
src/u3.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u30.rs
Normal file
1
src/u30.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u31.rs
Normal file
1
src/u31.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u32.rs
Normal file
1
src/u32.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u33.rs
Normal file
1
src/u33.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u34.rs
Normal file
1
src/u34.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u35.rs
Normal file
1
src/u35.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u36.rs
Normal file
1
src/u36.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u37.rs
Normal file
1
src/u37.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u38.rs
Normal file
1
src/u38.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u39.rs
Normal file
1
src/u39.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u4.rs
Normal file
1
src/u4.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u40.rs
Normal file
1
src/u40.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u41.rs
Normal file
1
src/u41.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u42.rs
Normal file
1
src/u42.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u43.rs
Normal file
1
src/u43.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u44.rs
Normal file
1
src/u44.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u45.rs
Normal file
1
src/u45.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u46.rs
Normal file
1
src/u46.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u47.rs
Normal file
1
src/u47.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u48.rs
Normal file
1
src/u48.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u5.rs
Normal file
1
src/u5.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u6.rs
Normal file
1
src/u6.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u7.rs
Normal file
1
src/u7.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u8.rs
Normal file
1
src/u8.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
1
src/u9.rs
Normal file
1
src/u9.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue