• jQuery
  • Spring
  • Core Java
  • Struts
  • Servlet
  • PHP
  • JavaScript
  • Java IO
  • JSP

  • <

    Rust While Loop

    When the condition is true then it execute while loop otherwise teminates the loop.While loop is indefinite.


    Rust While Loop Example


    fn main(){
       let mut x = 0;
       while x < 5{
          x+=1;
          println!("value of x is {}",x);
       }
       
    }
    

    Output:
    value of x is 1
    value of x is 2
    value of x is 3
    value of x is 4
    value of x is 5
    
    

    capture
















    © copyright 2017-2021 Completedone pvt ltd.