This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdlib> | |
| bool valueOfZ(int x, int y, int z){ | |
| int temp = abs(2*x - 2*y); | |
| if (z==temp){ | |
| return true; | |
| }else{ | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "helpers.h" | |
| void colorize(int height, int width, RGBTRIPLE image[height][width]) | |
| { | |
| //going through each pixel using the 2-D array. | |
| for (int i = 0; i < height; i++) | |
| { | |
| for (int j = 0; j < width; j++) | |
| { | |
| image[i][j].rgbtBlue = 0x10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| graph = { | |
| 'A': ['B', 'C'], | |
| 'B': ['A', 'D', 'E'], | |
| 'C': ['A', 'F'], | |
| 'D': ['B'], | |
| 'E': ['B', 'F'], | |
| 'F': ['C', 'E'] | |
| } | |
| # # Take input for the graph |