Wednesday, December 14, 2016

Print Function

Read an integer .
Without using any string methods, try to print the following:

Note that "" represents the values in between.
Input Format
The first line contains an integer .
Output Format
Output the answer as explained in the task.
Sample Input
3
Sample Output
123 
 
 
Python 3.0 Code: 
 
inp=int(input())
x=1
while (x<=inp):
  print(x,end="")
  x+=1;