This commit is contained in:
Rhinemann 2023-05-06 23:44:34 +03:00
parent 83b275cefd
commit 74209977bc
116 changed files with 14 additions and 12 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
Java/Lab 1/Lab_1.class
.gitignore
Java/Lab 2/Lab_2.class
Rust/

View File

@ -2,14 +2,19 @@ fn main() {
// use text_io::scan;
use text_io::read;
print!("Input: ");
print!("Enter m: ");
let m: f32 = read!();
// read until a whitespace and try to convert what was read into an i32
let a: i32 = read!();
print!("Enter n: ");
let n: f32 = read!();
/* let i: u32;
print!("Input: ");
scan!("{}", i); */
print!("Enter a: ");
let a: f32 = read!();
println!("You have input: {}", a);
print!("Enter b: ");
let b: f32 = read!();
let s: f32 = ((b + m) / 2.0) * (m - b + 1.0) * (n - a + 1.0);
println!("S= {}", s);
}

View File

@ -1,2 +0,0 @@
{"message":"unexpected end of macro invocation","code":null,"level":"error","spans":[{"file_name":"src/main.rs","byte_start":179,"byte_end":186,"line_start":8,"line_end":8,"column_start":18,"column_end":25,"is_primary":true,"text":[{"text":" let a: i32 = scan!();","highlight_start":18,"highlight_end":25}],"label":"missing tokens in macro arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"while trying to match meta-variable `$text:expr`","code":null,"level":"note","spans":[{"file_name":"/home/rhinemann/.cargo/registry/src/github.com-1ecc6299db9ec823/text_io-0.1.12/src/lib.rs","byte_start":6858,"byte_end":6868,"line_start":225,"line_end":225,"column_start":6,"column_end":16,"is_primary":true,"text":[{"text":" ($text:expr, $($arg:expr),*) => {","highlight_start":6,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: unexpected end of macro invocation\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:8:18\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m8\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let a: i32 = scan!();\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mmissing tokens in macro arguments\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;10mnote\u001b[0m\u001b[0m: while trying to match meta-variable `$text:expr`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m/home/rhinemann/.cargo/registry/src/github.com-1ecc6299db9ec823/text_io-0.1.12/src/lib.rs:225:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m225\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m ($text:expr, $($arg:expr),*) => {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;10m^^^^^^^^^^\u001b[0m\n\n"}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m\n\n"}

Some files were not shown because too many files have changed in this diff Show More