Program to print the number from 1 to 10 using for loop in java
package IncludeHelp;
public class Print_1_To_10_UsingFor
{
public static void main(String[] args)
{
//print the result
System.out.println("Output is : ");
//loop to print 1 to 10.
for(int i = 1; i <= 10; i++)
{
System.out.println(i);
}
}
}
Program to print the number from 1 to 10 using for loop in java
Output