Saturday, November 13, 2021

Java Program to Display Numbers from 1 to 10 Using For Loop

 

Java Program to Display Numbers from 1 to 10 Using For Loop



  1. public class Use_For_Loop
  2. {
  3.     public static void main(String[] args)
  4.     {
  5.         for(int i = 1; i <= 10; i++)
  6.         {
  7.             System.out.println(i);
  8.         }
  9.     }
  10. }

No comments:

Post a Comment