I have been assigned to write a program that randomly generates two arrays of 25 int values each, and adds them element by element.
example--
array1--->5 6 4 2 8 0 2 4 7 5 4.......
+
array2--->2 2 7 4 8 1 8 2 9 3 6.......
________________________
array3--->7 9 1 7 6 2 0 7 6 9 0
Ive already designed and tested the code to add, but when it comes time for the user to enter the answer, the assignment specifically asks to enter it as a sting, so the user can enter a continuous # instead of one by one.
the way ive gone about this, is by declaring a string:
char array4[26]; (i added one number for the null character)
cin.getline(array4,26);
and this is where im stuck....how can i get the user to enter a continuous number and have the compiler check to see if the user is correct?? ive been trying to solve this every way for the last few days and nothing!!!
Any help is greatly appreciated!