Thread: Multi input to Output.

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    9

    Question Multi input to Output.

    Got a simple question.

    I'm doing a program where i have to input time as minutes and seconds. From this i have to have the input come out in a table. I have figured out how to do the input and calculate the time but as for doing multiple input and having it all show up in a table i am stuck.

    i am using a do while loop but it's not helping.. I'm alittle lost and any help would be appreciated..

    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    9
    oh here is my loop sorry forgot to post on the last message..

    do {
    smin = minute * S_PER_M;
    time= smin + second;
    temptime= tapetime - time;
    tmin = time/S_PER_M;
    tsec = time%S_PER_M;
    printf(" %d %d:%d %d:%d\n",num,minute,second,tmin,tsec);
    scanf("%d", &num);
    scanf("%d", &minute);
    scanf("%d", &second);
    }while (time < tapetime);

  3. #3
    Unregistered
    Guest
    Could you describe what you need to do better? such as how the table is supposed to look, and more code if possible.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    9

    Talking

    I'm sorry i figured out what i was doing wrong.. i had one of my variables set up to be an address in my output ie i had the & in my printf statement and was unable to get the outout to come out right.. sigh, such a simple problem..... but thanks for the suggestions..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Input and Output files
    By matrixhelp in forum C Programming
    Replies: 1
    Last Post: 03-10-2008, 02:07 AM
  2. Replies: 5
    Last Post: 02-25-2008, 06:35 AM
  3. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  4. Input / Output help (arrays)
    By fp123 in forum C++ Programming
    Replies: 1
    Last Post: 01-15-2006, 12:30 PM
  5. output as input
    By DDC in forum Linux Programming
    Replies: 3
    Last Post: 02-23-2003, 07:59 AM