Example Code

Phone Number Trick 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

Download All

Overview
This example VI performs an interesting algebra calculation ‘Phone Number Trick’.


Description

This is a fun example for algebra students and experienced math enthusiasts alike. When you enter the first three digits of your phone number, adding, subtracting, multiplying and dividing by various numbers (including the rest of your phone number) will eventually reveal the full number!

 
Requirements

  • LabVIEW Base Development System 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open the VI " Phone Number Trick 2012 NIVerified.vi"
  2. Run the program
  3. Enter the first three digits of your phone number (not the area code) in the first box
  4. Follow the math and enter the last four digits of your phone number where asked
  5. When you are finished, click the "Calculate My Number" button at the bottom to reveal your phone number!
  6. The math behind the trick is also explained at the bottom of the VI. Have fun, and keep math-ing!

 

Additional Information or References
VI Front Panel

f.png

VI Block Diagram

 b.png

 

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

Will Hilzinger | Switch Product Support Engineer | National Instruments

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