Computer Science, asked by xxxse, 9 months ago

Write a program in java to display all the natural numbers from 1 to 10.

Answers

Answered by Anonymous
5

// To display all the natural numbers from 1 to 10

public class Natural

{

public static void main(String args[])

{

int a;

System.out.println("Natural Numbers from 1 to 10:");

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

System.out.println(a);

}

}

Similar questions