Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void printFile(FILE *fout,int grid[][1024],int rows,int cols, int grayscale){
- int i,j;
- fprintf(fout,"P2\n");
- fprintf(fout,"%d %d\n", rows, cols);
- fprintf(fout,"%d\n", grayscale);
- for(i=0;i<rows;i++){
- for(j=0;j<cols;j++){
- fprintf(fout,"%d ", grid[i][j]);
- }
- fprintf(fout,"\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement