
출제 링크 : https://www.acmicpc.net/problem/2742
2742번: 기찍 N
자연수 N이 주어졌을 때, N부터 1까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.
www.acmicpc.net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Solution
{
class Program
{
static void Main(string[] args)
{
int num = int.Parse(Console.ReadLine());
StringBuilder sb = new StringBuilder();
for(int i = 0; i < num; i++)
{
int result = num-i;
sb.Append($"{result}\n");
}
Console.Write(sb);
}
}
}
