Problem:
Question 1: Using a text editor (not a C++ program) creates a similar PGM file with your initials. Use the plain PGM file format as described here, but use 255 for the maxval. Use a light gray (say, 180) for the background, and make each letter a different dark gray (128, 64, 32) or black (0).
Question 2: Write a C++ program that writes a PGM out to a text file. Make your image 40 columns by 20 rows. Set the maxval to 255. Let each pixel be 4 more than the previous pixel; let each row be 10 more than the row above it. If any pixel is greater than 255, subtract 256 from it.
Please show the code step by step.