using System;
public class bj8393
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int sum = 0;
for (int i=1; i<=n; i++)
{
sum += i;
}
Console.WriteLine(sum);
}
}
}
'C# > C# (백준)' 카테고리의 다른 글
[C#] 백준 알고리즘 2438번, 별 찍기 - 1 (0) | 2022.07.27 |
---|---|
[C#] 백준 알고리즘 2741번, N 찍기 (0) | 2022.07.26 |
[C#] 백준 알고리즘 10950번, A+B - 3 (0) | 2022.07.25 |
[C#] 백준 알고리즘 2739번, 구구단 (0) | 2022.07.25 |
[C#] 백준 알고리즘 2480, 주사위 세개 (0) | 2022.07.22 |