Rust Program to Demonstrate the If-Else Statement

In case you are in trouble, our website is waiting to help you. Rust Program to Demonstrate the If-Else Statement are going to find out through this article.

Rust Program to Demonstrate the If-Else Statement

Rust Program to Demonstrate the If-Else Statement

// Rust program to demonstrate 
// the if-else statement

fn main() {
    let mut num:i32 = 25;

    if(num%2 == 0)
    {
        println!("Number is EVEN");
    }
    else
    {
        println!("Number is ODD");
    }
}
Number is ODD

Final Words

We hope you enjoyed the article Rust Program to Demonstrate the If-Else Statement. The reason is that all your doubts will be resolved through this article.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment