HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


140. 50393 - Palindromic Numbers

Guest
• Review clarifications (2)

Volume problems

• 095. 50453 - The Cubic Difference
• 100. 50397 - The Number of Points ...
• 110. 50409 - Random Password Ge...
• 120. 50684 - Sum of prime numbers...
• 125. 50578 - Mersenne prime
• 130. 50652 - Prime Factorization
• 132. 50474 - Sum of Two Primes
• 135. 50572 - Palindromic Numbers
• 140. 50393 - Palindromic Numbers
• 145. 50586 - Prime Palindromes
• 148. 50412 - K numbers
• 150. 50375 - Area of Circles
• 160. 50388 - Number of Armstrong ...
• 160. 50571 - Armstrong Numbers - 2
• 165. 50577 - Perfect Numbers and ...
• 190. 50533 - Contacts List
• 200. 50454 - What day is it?

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

The Number of Palindromic Numbers

Note: This question has been designed for C & C++. It will not work for other programming languages.
A number is palindromic, if it's read from left to right and from right to left the same. e.g. StackcatS is a palindromic word, but Cat is not.

Question: Assume that you are given the following functions in the header file Palin.h :

  • bool palindrome(int num); // decides if the given number is palindromic or not
  • int getNum(); // this function gets and returns a number
  • void showResult(int num);// shows the result on screen

Use the functions above in your program, and, get 5 numbers (using the function getNum(); ). And then, show the number of palindromic numbers (using the function showResult(int num); )
Note: For C and C++, you can include the functions using the following statement.
  #include "utils/Palin.h"

Input specification
Get five numbers through the function getNum();

Output specification
Show the result through the function showResult(int num);

Для отправки решений необходимо выполнить вход.

www.contester.ru