0

im just new here..and i really need some1 who can help me do our exercises..its about java(using looping/iteration)..i know others in java but not yet 'bout looping..

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by oliver_lundag
1

im just new here..and i really need some1 who can help me do our exercises..its about java(using looping/iteration)..i know others in java but not yet 'bout looping..

You aren't getting help because you aren't showing effort yet. It's the policy on this forum (and just about all forums) that posters must show something in their post to show that they have researched the subject and aren't just asking people to do the whole thing for them.

http://www.daniweb.com/forums/announcement9-2.html

Here's a good link for how to post successfully on a forum.

http://catb.org/esr/faqs/smart-questions.html

Post your attempt and I'm sure someone will help. Thanks.

Votes + Comments
It sure is!
0
public class looping {// start class
	private static int  value = 1;// declare int value = 1
	
	public static void main (String[] args){//start method
		for (int i = 1; i<=10;i++ ){//start loop
			System.out.println(value);//print out the value
			value = i + value; //adding the valu of i while looping 
		}//end of loop
	}//end of method
}//end of class looping

/*
 * 05091987revilogadnul 
 * 2009
 * Applied Ideas Inc.
 * <snipped>
 * <snipped>
 */

output:
1
2
4
7
11
16
22
29
37
46

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.