polybius. University of Michigan - EECS 183
/** * * * Hadianto Leonard & Tian You Guo * leonhadi & kevinguo * * EECS 183: Project 3 * * #description# */ #include "polybius.h" #include string using namespace std; vo id fillGrid(char grid[SIZE][SIZE], string content) { int i=0; for ( int row = 0; row SIZE; row++) { for (int column = 0; column SIZE; column ++, i++) { grid[row][column] = content[i]; } } } string mixKey(string key) { string str = ""; string s = key + ALNUM; s = key + ALNUM; bool flag = false; for (int i = 0; i (); i++) { if (i == 0) { str += s[i]; } else if ( i != 0) { for (int j = i-1; j = 0; j--) { if (s[i] == s[j]) { flag = true; } } if (flag == false) { str += s[i]; } else if ( flag == true) { flag = false; } } } return str; } string findInGrid(char c, char grid[SIZE][SIZE]) { int i=0; string s = ""; for ( int row = 0; row SIZE; row++)
Written for
Document information
- Uploaded on
- July 11, 2021
- Number of pages
- 2
- Written in
- 2020/2021
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
polybius university of michigan eecs 183