Thread: Please tell me...how to

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    19

    Please tell me...how to

    get a program to read 3 sets of numbers in columns

  2. #2
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    well, if i understand you better, this might be the solution

    Code:
    void getnum(FILE *fp)
    {
            int temp[3];
        
        while(fscanf(fp,"%d %d %d",&temp[0],&temp[1],&temp[2])==3)
           printf("%d %d %d\n",temp[0],temp[1],temp[2]);
    
       return;
    }
    and this is not the complete programe. its up to you to write a main function for that

    ssharish2005
    Last edited by ssharish2005; 10-15-2005 at 09:13 PM.

Popular pages Recent additions subscribe to a feed