/*Example
:
Input - 5
Output - 1 2 3 4 5 */
class Join {
public static void main(String args[]) {
int num = Integer.parseInt(args[0]);
String result = " ";
for (int i = 1; i <= num; i++) {
result = result + i + " ";
}
System.out.println(result);
}
}
:
Input - 5
Output - 1 2 3 4 5 */
class Join {
public static void main(String args[]) {
int num = Integer.parseInt(args[0]);
String result = " ";
for (int i = 1; i <= num; i++) {
result = result + i + " ";
}
System.out.println(result);
}
}

No comments: