Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assignment 1B

 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI-
Ok, I've made Assignment 1b work using a complex calculation, but I think the teacher would like me to find a simplier calculation to use...I'm working on it, in the mean time, another way I thought of:

does anyone know the method to check how many times something was printed to the console?
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I guess each time you print that something you could increment a counter variable.
 
K. Tsang
Bartender
Posts: 3440
13
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nested for loop is one approach
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic