Results 1 to 5 of 5
- 09-06-2011, 03:25 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 2
- Rep Power
- 0
help me for this nested for loop with users input
i dont know how to put the user's input with this..when i run this it automatically runs without asking how many asterisk..im new in java :(
int x,y;
for(x=5;x>=1;x--)
{
for(y=1;y<=1;y++)
{System.out.print("*");}
{System.out.println("");}
}
}
}
the output of this is
*****
****
***
**
*
i want the output is
Enter number:
(then it depends on the number in how many asterisk are there)
- 09-06-2011, 03:39 PM #2
Re: help me for this nested for loop with users input
you could say what are your probs... (since like said indeed it's not the intention to just give the code, forgat that;.. :( )
and do try not to doublepost things...
grtz lilumaLast edited by liluma; 09-06-2011 at 03:52 PM.
- 09-06-2011, 03:46 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,459
- Rep Power
- 16
Re: help me for this nested for loop with users input
Please don't spoonfeed code to people.
It's not what this forum is here for.
- 09-06-2011, 03:49 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
- 09-06-2011, 03:50 PM #5
Similar Threads
-
Nested Loop
By sehudson in forum New To JavaReplies: 2Last Post: 03-11-2011, 03:39 AM -
extract time from users input
By darshna in forum New To JavaReplies: 2Last Post: 02-12-2010, 12:07 PM -
can some one help me with nested loop?
By keycoffee in forum New To JavaReplies: 10Last Post: 01-25-2010, 02:49 AM -
problem with Scanner in Getting users input
By kliane in forum New To JavaReplies: 8Last Post: 01-17-2010, 04:37 PM -
Nested For Loop
By yuchuang in forum New To JavaReplies: 1Last Post: 07-08-2007, 01:11 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks