Results 1 to 5 of 5
  1. #1
    lodestaryouth is offline Member
    Join Date
    Mar 2014
    Posts
    2
    Rep Power
    0

  2. #2
    lodestaryouth is offline Member
    Join Date
    Mar 2014
    Posts
    2
    Rep Power
    0

    Default Re: Need help with excercise

    Ball bouncing program

    public class BallBounce {
    public static void main(String[] args) {
    double ball=10.0;
    for(int i=1; i<=20; i++){
    ball=ball*0.8;
    int nspaces=(int)(Math.round(ball*10))-1;
    for(int j=1;j<=nspaces;j++){
    System.out.print(" ");
    }
    System.out.println("*");

    }
    }
    }

  3. #3
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Need help with excercise

    Hi,

    I would suggest that you simply ask questions / describe where you have problems. Just posting some code and a description of an exercise simply does not tell us, where you need help.

    And when posting code: Please use the code insertion of this forum so it is formated properly.

    With kind regards,

    Konrad

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,076
    Rep Power
    4

    Default Re: Need help with excercise

    I have seen many make-my-homework-cos-I-am-teh-sux, but posting a link to a Google Doc is something not many people have done before. Most of the times, it's the old scanned pic of the paper assignment or the printscreen of the PDF. Sometimes, if we're lucky, the emailaddress of the professor is still in the document, which makes it more fun altogether.

    I hope you, the OP, realize we don't hand out freebies here. Unless you pay me my hourly wage, then it's just another job.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,346
    Rep Power
    6

    Default Re: Need help with excercise

    Quote Originally Posted by SurfMan View Post
    I hope you, the OP, realize we don't hand out freebies here. Unless you pay me my hourly wage, then it's just another job.
    How do you declare that work I wonder? "Extra income" or something?
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. help me solve excercise from book
    By andreya in forum New To Java
    Replies: 5
    Last Post: 03-14-2014, 04:28 AM
  2. Need A SMART person for this excercise (beginner)
    By khavanian in forum New To Java
    Replies: 11
    Last Post: 10-12-2012, 11:14 AM
  3. Replies: 17
    Last Post: 08-22-2010, 05:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •