Search:

Type: Posts; User: angstrem

Search: Search took 0.09 seconds.

  1. Replies
    7
    Views
    1,158

    Re: Whats wrong with this for loop?

    Helper methods are used in order to encapsulate different parts of computation so that your code becomes more readable. In my example, you encapsulate the entire computation within...
  2. Replies
    7
    Views
    1,158

    Re: Whats wrong with this for loop?

    You can, for instance, make a method with the whole formula. So, that your loop would look like as follows:


    for(double c = 280; c <= 400; c += 5) {
    String earthsurfTemp =...
  3. Replies
    7
    Views
    1,158

    Re: Whats wrong with this for loop?

    That's why self-education is better :)
  4. Replies
    7
    Views
    1,158

    Re: Whats wrong with this for loop?

    One guy posted similar question with similar assignment yesterday.

    Now remember: int/int=int, not double. For example C0/PRE_CARBON is always an integer, not double.
Results 1 to 4 of 4