1.

IF ANYBODY TELLS THE CORRECT ANSWER I WILL MARK YOU AS BRAINLIEST (WRITE A PROGRAM IN DO WHILE LOOP JAVA TO DISPLAY 10 NATURAL NUMBERS)​

Answer»

d Answer:-Correct Question:Write a Java program using do while loop to display first 10 natural numbers.Solution:Here comes the program. PUBLIC class Number {  public static VOID main(String[] args) {     int i=1;     do {        System.out.print(i+" ");        i=i+1;     } while (i<=10);  }}Algorithm:STARTInitialise a variable with value = 1Display the value of the variable. Increment the value of the variable by 1.Repeat this STEPS TILL the number is less than or equal to 11.STOPRefer to the ATTACHMENT for output ☑.



Discussion

No Comment Found