Martes, Pebrero 7, 2012

basic 15: adding all loop

package get.the.greater.factor.by.fran;
public class GetTheGreaterFactorByFran {
    public static void main(String[] args) {




        int y = 10;
      
       int temp = 0;
        for(int x= 1; x <= y;x++)
            
                temp += x ;
       
            
         System.out.println (temp);
   
    }
}

Walang komento:

Mag-post ng isang Komento