using System;
namespace HelloWorld
{
internal class Program
{
static void Main(string[] args)
{
for(int i=1; i < 6; i++)
{
if(i%2 == 0)
{
Console.WriteLine("{0} : 짝",i);
}
else
{
Console.WriteLine("{0} : 홀", i);
}
}
}
}
}
using System;
using System.Diagnostics.CodeAnalysis;
namespace HelloWorld
{
internal class Program
{
static void Main(string[] args)
{
int sum = 0;
for(int i=1; i<11; i++)
{
Console.WriteLine(i);
sum += i;
}
Console.WriteLine("-------------");
Console.WriteLine("sum : {0}",sum);
}
}
}
using System;
using System.Diagnostics.CodeAnalysis;
namespace HelloWorld
{
internal class Program
{
static void Main(string[] args)
{
Console.Write("구구단의 단수를 입력하세요");
string num = Console.ReadLine();
int j = Convert.ToInt32(num);
if (j < 1 || j > 9)
{
Console.WriteLine("출력 불가");
}
else {
for (int i = 1; i < 10; i++)
{
Console.WriteLine("{0} X {1} = {2}", j, i, j * i);
}
}
}
}
}