You are on page 1of 4

UNIVERSITY OF THE EAST

Computer Engineering Department

IDENTIFYING A
PALINDROME NUMBER
FINAL PROJECT

BUENVIAJE, CYLLE JERONE A.

20191141556

MAY 25, 2021


Description and Function:

A Palindromic number (also known as a numeral palindrome or a numeric


palindrome) is a number that remains the same when its digits are reversed. In other
words, it has reflectional symmetry across a vertical axis. The term palindromic is
derived from palindrome, which refers to a word such as rotor or racecar whose spelling
is unchanged when its letters are reversed.

A palindromic sequence is a nucleic acid sequence in a double-


stranded DNA or RNA molecule wherein reading in a certain direction (e.g. 5' to 3') on
one strand matches the sequence reading in the opposite direction (e.g. 5' to 3') on
the complementary strand. This definition of palindrome thus depends on
complementary strands being palindromic of each other.

Being a current Civil Engineering Student, I know how Science was applied in the
field. Especially, to the practical application of this course itself. Knowing that the course
outline of this subject includes Chemistry and Physics, a program was intended to solve
these is designed.

This program end to identify if a specific number is a Palindrome number. The


program will ask you to enter a positive number which is stored in variable num. The
number is saved into another variable to check it when the original number has been
reversed.

The highlight of this program was to identify the dominate and recessive genes
through DNA in its natural, double-stranded form may contain palindromes, sequences
which read the same from either side because they are identical to their reverse
complement on the sister strand. Short palindromes are underrepresented in all kinds of
genomes. The frequency distribution of short palindromes exhibits more than twice the
inter-species variance of non-palindromic sequences, which renders palindromes
optimally suited for the typing of DNA.

From the functions of the program itself are:

 To identify if a certain value was to be considered a Palindromic number

 To come up with a hassle free program that will contribute to the field of
Sciences.

 To serve as a platform to determine the dominate and recessive genes from the
set of palindromic sequence
Source Code:

#include <iostream>

using namespace std;

int main()

int n, num, digit, rev = 0;

cout << "Enter a Positive Number: ";

cin >> num;

n = num;

do

digit = num % 10;

rev = (rev * 10) + digit;

num = num / 10;

} while (num != 0);

cout << " The Reverse of the Number is: " << rev << endl;

if (n == rev)

cout << " The Number is a Palindrome.";

else
cout << " The Number is not a Palindrome.";

return 0;

Sample Output:

You might also like