Number Line Sample input: 6 Sample output 123456
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package BASICJAVA;
import java.util.Scanner;
/**
*
* @author ABIR
*/
public class Number_Line {
public static void main(String[]args){
Scanner abir=new Scanner(System.in);
System.out.println("Enter sample input");
int x=abir.nextInt();
System.out.println("sample output");
int c=0;
while(c<x){
System.out.print(c+1);
c++;
}
System.out.println();
System.out.println("=======================================================");
}
}