solutions: 1807A

This commit is contained in:
Muhammad Nauman Raza 2025-01-11 13:40:21 +00:00
parent c50d37dad3
commit 56845981af
Signed by: devraza
GPG key ID: 91EAD6081011574B

24
solutions/rust/1807A.rs Normal file
View file

@ -0,0 +1,24 @@
use std::io;
fn main() {
let mut t = String::new();
io::stdin().read_line(&mut t).unwrap();
for _ in 1..=t.trim().parse::<i16>().unwrap() {
let mut n = String::new();
io::stdin().read_line(&mut n).unwrap();
let array = n.trim().split_whitespace().collect::<Vec<&str>>();
let mut int_array: Vec<i8> = vec![];
for i in array {
int_array.push(i.parse::<i8>().unwrap());
}
if int_array[0] + int_array[1] == int_array[2] {
println!("+");
} else {
println!("-");
}
}
}