Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
How did you try and what didn't work? And that sounds like a task from somewhere. Is it really necessary to do labs on the growth somewhere? (:
Well, many questions arise: do you really need an array? If so, what to do if you entered more numbers?
Well, in general, something like this:
use std::io;
fn main() {
//let mut input = String::new();
//io::stdin().read_line(&mut input).unwrap();
let data1: Vec<i32> = input.split(' ').map(|x| x.parse().unwrap()).collect();
let data2 = vec![1, 2, 3];
if data1 == data2 {
println!("equal!");
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question