Assignment #118 Armstrong Numbers

Code

      ///Name: Ian Grant
      ///Period:5
      ///Project Name: Armstrong Numbers
      ///File Name:Arm.java
      ///05/25/16
      
      public class arm
      {
          public static void main (String [] args)
          {
              int counter = 100;
              for(int hun = 1; hun < 10; hun++)
              {
                  for (int ten = 0; ten < 10; ten++)
                  {
                      for (int one = 0; one < 10; one++)
                      {
                          double pos = Math.pow(hun,3) + Math.pow(ten,3) + Math.pow(one,3);
                          if (pos == counter)
                          {
                              System.out.print(counter + " ");
                          }
                          counter++;
                      }
                  }
              }
          }
      }
      

Output