// Rust program to calculate the HCF. use std::io; fn main() { let mut n1:u32 = 0; let mut n2:u32 = 0; let mut temp:u32 = 0; let mut input1 = String::new(); let mut input2 = String::new(); println!("Enter number1: "); io::stdin().read_line(&mut input1)....
("The HCF of {0} and {1} is {2}.", a, b, res); } Output:The HCF of 36 and 48 is 12. Explanation:In the above program, we created two functions calculateHCF() and main(). The calculateHCF() function is a recursive function, which is used to calculate the HCF of two ...