Posted by : Unknown Thursday, 11 June 2015

class Sum
public static void main(String args[]) 
{
int sum=0, n=10; 
for(int i=1; i<=n; i++) 
{
sum=sum+i; 
System.out.print("\n The Sum = "+sum); 
}

Output:

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

Blog Archive

- Copyright © Learning Java Program - Powered by Blogger -