구구단 출력
Console Programming/C# Console 2019. 9. 20. 04:222 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
3 x 1 = 3
3 x 2 = 6
.
.
.
을 출력하는 프로그램
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
for (int i = 2; i < 10; i++)
{
for (int j = 1; j < 10; j++)
{
Console.WriteLine($"{i} x {j} = {i * j}");
}
Console.WriteLine();
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
![](https://blog.kakaocdn.net/dn/Paxuw/btqynSpCg1f/dSKQSkm41drqdZ8KhNlbN1/img.png)
![](https://blog.kakaocdn.net/dn/w6a2X/btqyqyiIMYd/nf1hUVO2BPsxydKpavzdk1/img.png)
'Console Programming > C# Console' 카테고리의 다른 글
구구단 출력3 (0) | 2019.09.20 |
---|---|
구구단 출력2 (0) | 2019.09.20 |
2일차 구구단 중에 원하는 단을 입력해주세요. FormatException 에러 해결 (0) | 2019.09.19 |
2일차 구구단 중에 원하는 단을 입력해주세요. FormatException 에러 (0) | 2019.09.19 |
2일차 ***별찍기2*** (0) | 2019.09.19 |