Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLASS 2: 팰린드롬수 - [1259] #9

Closed
Tracked by #2
fkdl0048 opened this issue Aug 14, 2023 · 0 comments
Closed
Tracked by #2

CLASS 2: 팰린드롬수 - [1259] #9

fkdl0048 opened this issue Aug 14, 2023 · 0 comments
Assignees
Labels

Comments

@fkdl0048
Copy link
Owner

fkdl0048 commented Aug 14, 2023

CLASS 2: 팰린드롬수 - [1259]

namespace baekjoon_1259
{
    public class Palindrome
    {
        public bool IsPalindrome(string str)
        {
            int len = str.Length;
            for (int i = 0; i < len / 2; i++)
            {
                if (str[i] != str[len - i - 1])
                    return false;
            }
            return true;
        }
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            Palindrome palindrome = new Palindrome();
            while (true)
            {
                string str = System.Console.ReadLine();
                if (str == "0")
                    break;
                if (palindrome.IsPalindrome(str))
                    System.Console.WriteLine("yes");
                else
                    System.Console.WriteLine("no");
            }
        }
    }
}
@fkdl0048 fkdl0048 mentioned this issue Aug 14, 2023
6 tasks
@fkdl0048 fkdl0048 self-assigned this Aug 14, 2023
@fkdl0048 fkdl0048 added this to Todo Aug 14, 2023
@github-project-automation github-project-automation bot moved this to Todo in Todo Aug 14, 2023
@fkdl0048 fkdl0048 added this to the Solved.ac Class milestone Aug 14, 2023
@fkdl0048 fkdl0048 moved this from Todo to 💯Study in Todo Aug 14, 2023
@fkdl0048 fkdl0048 moved this from 💯Study to Two-Week Plan in Todo Aug 14, 2023
@fkdl0048 fkdl0048 moved this from Two-Week Plan to In Progress in Todo Aug 24, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Todo Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant