I am attempting to read a PGM file on standard input and print out the number of rows and columns that exist. I know that the file format begins with P2 and the next lines in the file are 235, 185, 255, then the pixels etc. I need to read these values and print them out using printf. I could use some help as to how to read in the values. Thanks for any help I can get.