Cruz Castillo

Generation

generate functionWed, 24 May 2023

Program to print the serie 1, 2, 3, 4,5, 6, 7, 8, 9, 10 with horizontal printing separated with a comma each number of the series.

public class PrintSeries{ public static void main(String[] args){ int i,n; for(i=1;i<=10;i++){ if(i<10){ System.out.println(i+","); }else{ System.out.println(i); } } } }

Want to kickstart your project?Use the new AI Studio to create your code