Hey Guys,
I have a small problem with my Java programming for college. I have been asked to write a programme in basic java using nested for loops
which will print out the following shape :
++++
+++
++
+
I don't really know how to go about it, so any help would be much appreciated :)
Alicia
XOXOXOXO
4 replies to this topic
#1
Posted 13 August 2011 - 11:14 AM
|
|
|
#2
Posted 13 August 2011 - 11:45 AM
Step 1: write the skeleton of a program with a nested for loop.
Hint: row 1 has 5-1 +'s, row 2 has 5-2 +'s, row 3 has 5-3 +'s, and row 4 has 5-4 +'s.
Hint: row 1 has 5-1 +'s, row 2 has 5-2 +'s, row 3 has 5-3 +'s, and row 4 has 5-4 +'s.
#3
Posted 13 August 2011 - 12:00 PM
Quote
Alicia
XOXOXOXO
XOXOXOXO

Not that it matters, but still...
Outer nested loop should print the newline character, inner one should print the pluses
#4
Posted 13 August 2011 - 06:16 PM
Sinipull said:

Not that it matters, but still...
Outer nested loop should print the newline character, inner one should print the pluses
lol :D :love::love::love:
#5
Posted 14 August 2011 - 03:19 PM
hint: you dont have to add to an integer for the for loop you can minus by --i.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









