# Divide Two Numbers in Rust

Feb 4, 2023
``` Machine Problem

Write a program to ask the user to give two numbers and then the program will find the quotient of the two given numbers and display the results on the screen using Rust programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My mobile number here in the Philippines is 09173084360.

Thank you very much for your support.

```
``````/* diff.rs
Author   : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
Date     : January 12, 2023  Thursday   10:35 AM
Address  : #25-31 Victoria Malaga Street Eroreco Subdivision 6100 Bacolod City, Negros Occidental Philippines
Mobile Number    : 09173084360
Telephone Number : (034) 433-5675
*/

use std::io;
use std::{i32};

fn main() {

println!("\n");
println!("Divide Two Numbers in Rust\n\n");

// User will give the first value.

println!("Give First Value : ");

let mut var1 = String::new();

println!("\n");

// User will give the second value.

println!("Give Second Value :  ");
let mut var2 = String::new();

// Converting string to integer
let a: i32 = var1.trim().parse().ok().expect("Program only processes numbers, Enter number");
let b: i32 = var2.trim().parse().ok().expect("Program only processes numbers, Enter number");

// Performing division of two values variable a and variable b

let divide = a/b;

// Output of basic operations
println!("\n");
println!("The quotient between {} and {} is {}.",a,b, divide);
println!("\n");
println!("End of Program");
println!("\n");
}  // End of Code``````