user
Instruction:Generate a correct code using nested loops in Java to achieve the following purpose

Input: Print numbers 1 to 10 in ascending order.


assistant
for(int i=1; i<=10; i++){  
    System.out.println(i);
}