Search:

Type: Posts; User: User2009

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    1,031

    Re: Problem with the output

    What input are you using? The reason I ask is because the way the code is now it will never print the result... unless i'm miss reading the question.

    The reason it will not print any result is...
  2. Replies
    3
    Views
    967

    Re: Number in words java proram

    What is the error that you get when you compile/run the code?
  3. Re: Write a Java program to calculate the modules of two numbers without using any inbuilt modulus operator.

    The key is in the data types of the variables.



    The value in the variable "divided" will be 2 because of its data type which is int.

    You can confirm this by adding this line:
    ...
  4. Replies
    4
    Views
    1,116

    Re: How to get better at java?

    The best way is to practice. :-)

    Come up with some coding problems and then write the code for it. Or search for java coding problems on the internet.
    If you get stuck just ask. There's always...
  5. Re: Write a Java program to calculate the modules of two numbers without using any inbuilt modulus operator.

    I'm assuming the "totally different" answer you're getting on a calculator is zero.
    If that is the case then the reason is in the type of the variables... particularly the variable "divided".
    ...
  6. Re: Bicycle Code - need a little help or tips to continue my homework

    I didn't get a chance to post earlier before term204's edits but it looks like you are on the right track


    This is what I was going to post earlier... before your edits:

    To calculate the total...
  7. Re: Bicycle Code - need a little help or tips to continue my homework

    First, this just means that the class Bicicleta should have a default constructor "Bicicleta()" and its attributes (ruedaDelantera, ruedaTrasera and cuadro) should be set with default values. To do...
  8. Re: Counting the number of statement in java code

    This is how I would count the number of statements:

    1). Printsum (Int a, Int b) { ------------ Printsum is a function
    2). Int result = a+ b;
    3). If (result> 0)
    4). Print ("Positive", result)...
  9. Replies
    13
    Views
    1,264

    Re: Help with if, else if and else statements

    I agree with Norm. That's how I would test the issue too, otherwise you'd spend too much time testing and you may never reproduce the specific circumstances where the error occurs.

    I tested using...
  10. Re: int's not adding together for some unknown reason

    Looks like the totals array was initialized with the starting value of trueLength, which was zero. Also it looks like the variable trueLength was calculated to be the total of the values in the...
Results 1 to 10 of 10