10817 세수

Console/Algorithm 2019. 9. 28. 16:35

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Syntax1
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            string[] arr = input.Split(' ');
            int a = int.Parse(arr[0]);
            int b = int.Parse(arr[1]);
            int c = int.Parse(arr[2]);
            if (a > b)
            {
                if (a > c)
                {
                    if (b > c)
                    {
                        Console.WriteLine(b);
                    }
                    else
                    {
                        Console.WriteLine(c);
                    }
                }
                else
                {
                    Console.WriteLine(a);
                }
            }
            else
            {
                if (a > c)
                {
                    Console.WriteLine(a);
                }
                else
                {
                    if(b>c)
                    {
                        Console.WriteLine(c);
                    }
                    else
                    {
                        Console.WriteLine(b);
                    }
                }
            }
        }
 
    }
 
}
 
 
 
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

'Console > Algorithm' 카테고리의 다른 글

2577 숫자의 개수  (0) 2019.10.15
2739 구구단  (0) 2019.09.30
2753 윤년  (0) 2019.09.27
1330 두 수 비교하기  (0) 2019.09.27
9498 시험성적  (0) 2019.09.27