728x90
10. (과제 내용)
using System;
using System.Diagnostics.Eventing.Reader;
using System.Diagnostics.Tracing;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters;
using System.Security.Permissions;
namespace LearnDotnet
{
internal class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 6; i++)
{
int num = i + 1;
Console.WriteLine("1000{0}", num);
}
}
}
}
11. (과제 내용)
1
3
5
7
9
using System;
using System.Diagnostics.Eventing.Reader;
using System.Diagnostics.Tracing;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters;
using System.Security.Permissions;
namespace LearnDotnet
{
internal class Program
{
static void Main(string[] args)
{
for(int i = 0; i < 10; i++)
{
if(i % 2 ==1)
{
Console.WriteLine(i);
}
}
}
}
}
12. (과제 내용)
문자를 입력하세요: a
a: 97
b: 98
c: 99
d: 100
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LearnDotnet
{
internal class Program
{
static void Main(string[] args)
{
Console.Write("문자를 입력하세요: ");
string input = Console.ReadLine();
char charinput = Convert.ToChar(input);
for(int i = 0; i < 4; i++)
{
Console.WriteLine("{0}: {1}", (char)(97+i), (int)charinput + i);
}
}
}
}
13. (과제내용)
10
9
8
7
6
5
4
3
2
1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LearnDotnet
{
internal class Program
{
static void Main(string[] args)
{
for(int i = 0; i < 10; i++)
{
Console.WriteLine(10 - i);
}
}
}
}
'KDT > C# 프로그래밍' 카테고리의 다른 글
23/07/21 스타크래프트2 (0) | 2023.07.21 |
---|---|
23/07/21 스타크래프트 1 (0) | 2023.07.21 |
23/07/20 퀴즈9 (0) | 2023.07.20 |
23/07/20 퀴즈8 (0) | 2023.07.20 |
23/07/20 퀴즈7 (0) | 2023.07.20 |