Menu
Question Index
...

Write a program to print the numbers in the given range using while loop. Spaces between the numbers are important and they should be in one line. Use System.out.println or System.out.print for printing.

Input (Integer, Integer) Printed Output
1 to 4 1 2 3 4
6 to 12 6 7 8 9 10 11 12
211 to 218 211 212 213 214 215 216 217 218



class PrintNumbersInRangeUsingWhile
{
    public static void main(String s[])
    {
        printNumbers(5, 15);

    }


    public static void printNumbers(int startValue, int endValue)
    {
    }

}

Doubts

Problems

Topic: while Loop In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App