Created
February 3, 2012 21:41
-
-
Save jimmykurian/1732848 to your computer and use it in GitHub Desktop.
A Java program named Sum10 that computes the sum of the first ten positive integers 1+2+ … +10. Print the result to the standard output.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Sum10.java - Jimmy Kurian | |
class Sum10{ | |
public static void main(String[] args) { | |
int s = 1+2+3+4+5+6+7+8+9+10; | |
System.out.println(s); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I write a program in java that will print special characters such as /|_/"()**## etc?