Skip to content

Files

Latest commit

62c7e7d · Oct 15, 2022

History

History

P006

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 15, 2022

Problem 006

Write a program which gets an integer N and calculates the sum of all numbers from 1 to N.

1 <= N <= 1000

Persian Description

برنامه ای بنویسید که ابتدا یک عدد از ورودی دریافت کند سپس حاصل جمع اعداد یک تا آن تا عدد را محاسبه و چاپ کند. ماکزیمم ورودی: ۱۰۰۰

Sample Input/Output

Input:

3
5
100

Output:

6
15
5050