daily pastebin goal
57%
SHARE
TWEET

APCS_SHORTS_C1X5_Sum10.java

calcpage Oct 4th, 2013 33 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Sum10.java              MrG             2013.1003
  3. purpose:                using println to do arithmetic!
  4. required files:         Sum10.java              main class
  5. translator phase:       javac Sum10.java
  6. interpreter phase:      java Sum10
  7. */
  8.  
  9. //main method
  10. public class Sum10
  11. {
  12.         public static void main(String[] args)
  13.         {
  14.                 System.out.print("1+2+3+4+5+6+7+8+9+10 = ");
  15.                 System.out.println(1+2+3+4+5+6+7+8+9+10);
  16.         }
  17. }
  18.  
  19. //C1X6: find the sum of the reciprocals of the first 10 positive integers
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top