Displaying a table of arbitrary values?

This is a discussion on Displaying a table of arbitrary values? within the C Programming forums, part of the General Programming Boards category; So I'm trying to write code that will display this table: Time Frequency 0 5.00000040 100 5.00000095 200 5.00000230 300 ...

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    1

    Displaying a table of arbitrary values?

    So I'm trying to write code that will display this table:
    Time Frequency
    0 5.00000040
    100 5.00000095
    200 5.00000230
    300 5.00001800
    400 5.00000870
    500 5.00000065
    600 5.00000370

    I have the "time" table down fine, (im using a for statement that requires time = 0; time <= 600; time += 100) and its displaying fine. I just don't understand how I can get Frequency to display an arbitrary value like those above, and also display on the sime line as the "times" Can anyone help please?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,473
    What is arbitrary value? any value from -1.7E +308 to 1.7E +308?


    to print 2 values on the same line use:

    Code:
    int time = 100;
    double value = 5.00001800;
    printf("&#37;d %10.8f\n",time,value);
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Table of X & Y Values.
    By danlee58 in forum C Programming
    Replies: 5
    Last Post: 10-15-2008, 04:29 AM
  2. A table for errno values by linux sockets?
    By hardi in forum Networking/Device Communication
    Replies: 2
    Last Post: 12-20-2006, 01:10 PM
  3. need some advice on displaying values
    By rEtard in forum Windows Programming
    Replies: 7
    Last Post: 06-16-2005, 09:55 AM
  4. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  5. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21