Search:

Type: Posts; User: Brandos12

Search: Search took 0.18 seconds.

  1. Replies
    1
    Views
    284

    Rounding with printf

    import java.util.Scanner;

    public class BouncingBall
    {
    public static void main(String[] args)
    {
    Scanner keyboard = new Scanner(System.in);
    int bounce = 0, time = 0;
    double...
  2. Replies
    3
    Views
    229

    Re: Rounding with printf

    Sorry I wasn't more specific.

    Here's how the output looks when I use println:


    Here's how the output looks when I use printf:


    Each time and height is outputted onto the same line (which I...
  3. Replies
    3
    Views
    229

    Rounding with printf

    Hello, I made a program and it works great, but I need the height to be rounded to the nearest 0.1

    Here is the program:

    import java.util.Scanner;

    public class BouncingBall
    {
    public...
Results 1 to 3 of 3