HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginner > problem:


50229 - Print All Numbers

Volume problems

• 50220 - Area and Perimeter Of The ...
• 50221 - Calculate the Average
• 50222 - Even or Odd
• 50223 - Average of Test Scores
• 50225 - Convert to Minutes and Sec...
• 50226 - Convert Celsius to Fahrenheit
• 50227 - Smallest Number
• 50228 - Even Numbers
• 50229 - Print All Numbers
• 50230 - ASCII Codes
• 50231 - Hours Minutes and Seconds
• 50236 - Put the Numbers in Descend...
• 50238 - Translate Score into Grade
• 50239 - Basic Math Calculator
• 50241 - Convert KPH to MPH
• 50242 - Second Largest
• 50262 - Function f(x)

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Print All Numbers

Write program to print all the numbers from 1 to N.

Input: In the first line, you will get a positive integer (N).

Output: The numbers until N (N is included) all separated with space.

Sample Input1:

Sample Input2:

5

12

Sample Output1:

Sample Output2:

1 2 3 4 5

1 2 3 4 5 6 7 8 9 10 11 12

 

Для отправки решений необходимо выполнить вход.

www.contester.ru