Example Code

Palindromic number indicator Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 Overview
This VI will return true if the input number is palindromic.


Description
A palindromic number is a number which looks the same forward and backwards. For Example: 11, 434, 7269627. This code has three inputs, Number In, Allow Negative Numbers, and Error In. Number In is the number you wish to determine if it is palindromic or not. Allow Negative Numbers is a boolean. 

-True means that negative numbers will be considered without the sign. 

-False means that the vi will return false if the number is negative.

Its output is true if the number is palindromic and false if it is not.

 
Requirements

  • LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Input the test number in Number In controls
  2. Run the VI to determine if it is palindromic or not.

Additional Information or References
VI Block Diagram

 5-312.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

-Jim B
Applications Engineer, National Instruments
CLD, CTD

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.