9일차 메서드의 정의(3) 짝수이면 True를 반환

Console Programming/C# Console 2019. 10. 3. 13:22
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
using System;
using Syntax24;
 
namespace Syntax24
{
    class App
    {
      
        public App()
        {
            
            Console.WriteLine("2019-09-30");
            Console.WriteLine();
 
      
 
            bool isEven = IsEven(10);
            Console.WriteLine(isEven);
        
        public bool IsEven(int n)
        {
            if (n % 2 == 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter

 

 

 

: