• Spring
  • RubyonRails
  • Java IO
  • jQuery
  • JavaScript
  • SQL Tutorial
  • PHP
  • Struts
  • Core Java

  • <

    Rust For Loop

    Rust for loop is executed specified of time and executed till the condition is true.

    Rust For Loop Example


    
     fn main()  
    {  
    let mut result;  
    for i in 1..5
    {  
    result=1+i;  
    println!("1+{}={}",i,result);  
    }  
    }  
    

    Output:
    1+1=2
    1+2=3
    1+3=4
    1+4=5
    

    capture
















    © copyright 2017-2021 Completedone pvt ltd.