Thread: How to implement a look up table in C programming for the below table?

  1. #1
    Registered User
    Join Date
    Aug 2017
    Posts
    2

    How to implement a look up table in C programming for the below table?


    down votefavorite
    In one of my application I need to implement a look up table in C.
    I have attached the lookup table.
    I need to pick the data depending on two variable parameters temperature and pressure
    for example if temp=0 and pressure=750 then I have to pick 14.37.and so on Thanks in advance



    down votefavorite
    In one of my application I need to implement a look up table in C.
    I have attached the lookup table.
    I need to pick the data depending on two variable parameters temperature and pressure
    for example if temp=0 and pressure=750 then I have to pick 14.37.and so on Thanks in advance

    Attached Images Attached Images How to implement a look up table in C programming for the below table?-my-table-jpg 

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    You are tying to solve a problem in a very inefficient way.

    But, put the data into a array and then select the answer from the array is how to do what you asked.

    But, it is a very poor way to get the answer.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 08-23-2017, 11:51 AM
  2. Replies: 6
    Last Post: 09-30-2011, 05:35 PM
  3. Error when trying to implement a hash table class
    By nempo in forum C++ Programming
    Replies: 5
    Last Post: 10-06-2007, 09:55 AM
  4. Sorting a table and saving a table help!!!
    By MrMe913 in forum C Programming
    Replies: 4
    Last Post: 04-18-2007, 12:19 PM
  5. Programming a Truth Table
    By Nitelite in forum C Programming
    Replies: 2
    Last Post: 09-26-2002, 01:49 PM

Tags for this Thread