Tuesday, 10 October 2017

Practical - 6

          PRACTICAL- 6
Aim of the practical:-
Write a program (WAP) to enter any number and check that whether it is palindrome or not.

Header files used:-
#include <iostream.h>
#include <stdlib.h>
Conditional statements/Loops used:-
i.                    If– else statement
ii.                  while loop
Procedures followed:-
The user will be asked to enter any number. We need to store a duplicate copy of that number in another variable. Then the reverse of that number will be formed using a while loop. After forming the reverse of the number it will be compared with the duplicate copy stored earlier to check whether it is palindrome or not.
Coding:-

No comments:

Post a Comment