Computer Science, asked by 7521853351nitinpatel, 3 months ago

while(++z<=d);
29. Write a program to print 17 natural numbers using a for() loop.
30. Write a program to print natural numbers from 20 to 1 using a for()​

Answers

Answered by shabbirali007
1

Explanation:

The first 10 natural nos are:

1

2

3

4

5

6

7

8

9

10

Explanation:

public class Exercise10 {

   

public static void main(String[] args)

  {      

  int i;

System.out.println ("The first 10 natural numbers are:\n");

for (i=1;i<=10;i++)

{      

System.out.println (i);

}

System.out.println ("\n");

}

}

Similar questions