/* Write a program to Concatenate string using for Loop
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);
}
}
Author is a Tech savvy and Web Enthusiast by nature and really love to help users by providing how-to posts and tech tutorials. He is a founder and author of technolamp.co.in and programming9.com.
YouTube Channel to SUBSCRIBE:
https://www.youtube.com/user/nvrajasekhar
Available: info@programming9.com
0 comments:
Post a Comment