logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    sfolax6776
    Oct 22, 2018
      ·  Edited: Oct 22, 2018

    C7 More Loops - While and Do While

    in Introduction to Java

    Reference:

    While: https://www.tutorialspoint.com/java/java_while_loop.htm

    Do While: https://www.tutorialspoint.com/java/java_do_while_loop.htm


    6 comments
    0
    yd89782
    Oct 25, 2018

    R2a

    0 10

    1 9

    2 8

    3 7

    4 6

    R2b

    10

    12

    14

    16

    18

    20

    22

    24

    26

    28

    30...


    R1a

    *

    **

    ***

    ****

    R1b

    =====

    *

    ====

    **

    ===

    ***

    ==

    ****

    =

    R1c

    *****

    *****

    *****

    *****...


    R22a 10

    R22b 1.78333333...

    R22c 2

    R22d 0

    0
    Davey Yu
    Oct 25, 2018  ·  Edited: Oct 28, 2018

    R6.2 a. 0 10 1 9 2 8 3 7 4 6 b. 01011121231341451561671781891910201121...

    R6.19 https://repl.it/@DaveyYu/Homework-for-October-31-3-or-October-28 don't know if it works or n

    R6.1

    a.

    *

    **

    ***

    ****




    b.

    =====

    *====

    **===

    ***==

    ****=




    c.

    *****

    R6.22

    a. 10

    b.6

    c.error

    d.error




    iamrocklee
    Oct 27, 2018

    r6.2

    a. 0 10

    1 9

    2 8

    3 7

    4 6

    r6.2 b.

    010

    19

    28

    37

    46

    r6.19

    int n = in.nextInt();

    double x=0;

    double s=1.0;

    while(s > 0.01)

    {s=1.0/(1+n*n);

    n++;

    x=x+s;

    }

    r6.1

    a.

    *

    **

    ***

    ****

    b.

    =====

    *====

    **===

    ***==

    ****=

    c.

    *****

    =====

    *****

    =====

    *****

    =====

    *****

    =====

    *****

    =====

    r6.22

    a.10

    b.0.27916666666

    c. 2

    d. 2


    0
    trjoshi3011
    Oct 28, 2018  ·  Edited: Oct 28, 2018

    R6.2 a. 0 10 b. 10,12,14,16,18,20...

    1 9

    2 8

    3 7

    4 6

    R.6.1 a.

    *

    **

    ***

    ****

    b.

    =====

    *

    ====

    **

    ===

    ***

    ==

    ****

    =

    c.

    *****

    *****

    *****

    *****

    *****

    ...

    R6.22

    a. 10

    b.1.925

    c.error

    d.error

    0
    danny481
    Oct 28, 2018  ·  Edited: Oct 28, 2018

    R5.6

    a. 0 10 b. 0 10 etc.

    1 9

    2 8

    3 7

    4 6

    R5.19

    https://repl.it/@Brainseater905/TransparentSeagreenBundledsoftware Warning: Do not press RUN. If you do, your computer is likely to crash.

    R5.1

    a. **********

    b.====

    *====

    **====

    ***====

    ****====

    c. stars

    stripes

    stars

    stripes

    stars

    stripes

    stars

    stripes

    stars

    stripes

    stars

    stripes

    (Crashes Computer)

    R5.22

    a.10

    b.6

    c and d. error