일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 백준
- 정렬
- 대구데이트
- 대구고깃집
- 들안길삼겹살
- 조건문
- BFS
- 브루트 포스
- 대구맛집
- 대명동맛집
- 수성구데이트
- C#
- 프로그래머스
- 대구삼겹살
- 대구카페
- 별찍기
- 오라클
- 안지랑카페
- programmers
- oracle
- 서울맛집
- 앞산카페
- 수성구맛집
- 큐
- 반복문
- 수성못맛집
- 수성못삼겹살
- 범어동맛집
- SQL
- 압구정데이트
- Today
- Total
모든 일상
C# 백준 2588문제 - 곱셈 본문

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
public class Program
{
public static void Main(string[] args)
{
string input = Console.ReadLine(); // 입력값 받아오기
string input2 = Console.ReadLine();
char[] array = input2.ToCharArray(); //input2의 입력값을 한자리 한자리 쪼개서 저장
int result = int.Parse(input) * int.Parse(input2);
for(int i=2; i>=0; i--) // 2 -> 0으로 가는 이유 : array배열에 저장시 앞자리부터 들어가기 때문
{
Console.WriteLine(int.Parse(input) * int.Parse(array[i].ToString()));
}
Console.WriteLine(result);
}
}
}
'코딩 공부 > C#' 카테고리의 다른 글
C# 백준 10950문제 A+B-3 (0) | 2021.06.08 |
---|---|
C# 백준 2884문제 알람시계 (0) | 2021.06.08 |
C# 백준 14681 사분면 고르기 (0) | 2021.06.07 |
C# 백준 2753문제 윤년 (0) | 2021.06.07 |
C# 백준 1330문제 두 수 비교하기 (0) | 2021.06.07 |