Arrays are filled by the user with numbers 1,2,3,4,5. It is necessary to deduce those arrays where there are numbers 3,4,5. And give as a number, for example 7 arrays with numbers 3,4,5.
I entered numbers in an array but some nonsense is deduced. Help!Write your question here.
The 2D array would make life much easier. Consider what you would need if the number of arrays increased to 100. That would mean 85 additional lines to create the arrays and another 425 lines or maybe more for the for loops to fill each array.
A short nested for loop could fill the array with the least amount of work.
The for loop at line 104 works for just 1 array only.
From line 108 on the {} around the if statement are not needed. Your next problem:
1 2
if (arr2[i] >= del)
cout << arr2[i] << endl;
Would actually look like:
1 2
if (arr2[0] >= del)
cout << arr2[0] << endl;
And the rest of the if statements would be the same.
The "i" you are using here comes from line 24 which is set to (0) zero and never changes unless I missed something. If you are thinking that you are using the "i" from the for loop you are not. That "i" was destroyed when the for loop ended.
Some things to consider to shorten your code and make it easier to work with.
Need to display the entire number of arrays that contain only 3,4,5. And count their number.
Thanks to everyone who gave ideas and codes for the solution.
If you have more ideas, I'll be glad to do everything.