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

Add C program to check if a number is a palindrome #2400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Praanjaljain29
Copy link

@Praanjaljain29 Praanjaljain29 commented Jan 13, 2025

This commit introduces a C program that checks whether a given integer is a palindrome. The program takes an integer as input, reverses it, and compares the reversed number with the original. If both are equal, the number is identified as a palindrome; otherwise, it is not. The implementation uses a while loop for reversing the number and conditional statements for comparison. This program is efficient and works for both positive and negative integers

Pull Request

Related issue

Fixes #<issue_number>

What does this PR do?

  • ...

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

This commit introduces a C program that checks whether a given integer is a palindrome. The program takes an integer as input, reverses it, and compares the reversed number with the original. If both are equal, the number is identified as a palindrome; otherwise, it is not. The implementation uses a while loop for reversing the number and conditional statements for comparison. This program is efficient and works for both positive and negative integers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant