Question: Help with Multi dimensional Array! Easy question! Basically I'm trying to create a matrix 5 by 5. Also each letter cant be repeated more than

Help with Multi dimensional Array! Easy question!

Basically I'm trying to create a matrix 5 by 5. Also each letter cant be repeated more than once in matrix and it cant use letter 'Z'.

Here is my code:

#include

#include

using namespace std;

const int numCol = 5;

int main(){ ifstream infile; infile.open("machineproblem5"); const int numCol = 5; string alaphabet="ABCDEFGHIJKLMNOPQRSTUVWXY"; char arr[5][5]; string firstline; char inputString[256]; char inputChar; infile>>firstline; infile>>inputChar; infile.getline(inputString,256); string matrixinput=(firstline+alaphabet);

for(int x=0;x if(matrixinput[x] >= 'a' && matrixinput[x]

This is the read in file: Happiness D EVDEUOA XC GCERVLEWQ, FESS BC EUV OCWWAOX XLC HNUVRAV VCWWERS E hello there D HAWWC XHARA E attack at dawn D IAAX IA NUVAR HEIIARSIMXH GRMVBA E the meeting is in san francisco D XHMS MUPCRIEXMCU MS AUORYFXAV NSMUB XHA QAYLCRV HEFFMUASS D XHA EUSLAR XC XHA PMRSX KNASXMCU CU XHA PMUEW IEY GA XRNA CR MX IEY GA PEWSA E the answer to the first question on the final may be true or it may be false D OCUBREXNWEXMCUS YCN IEVA MX XHRCNBH XHMS IEOHMUA FRCGWAI E advance to boardwalk, pass go and collect two hundred dollars E make my day E zorro is back (in town) E you ain't nothing but a hound dog E one day a computer will weigh less than a ton --- popular mechanics 1948 E no computer will ever need more than 640k of memory -- bill gates in the mid eighties D YCN EMUX UCXHMUB GNX E HCNUV VCB

The output should look like this:

Help with Multi dimensional Array! Easy question! Basically I'm trying to create

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!