

BAR_PC
registered user-
Number of messages
32 -
joining
-
Recently visited
Rating
0 neutralAbout BAR_PC
-
rank
Zone NewUser
- Birthday 14/07/1996
Recent Visitors
Visitors to your profile are disabled, and you can not see who recently visited your profile.
-
Yes thank you very much indeed! Appreciate
-
Yes two functions that get an array and return a cell number (each checks on each side) and another function that checks if the conditions are met then it returns the cell number if it does not return -1. I want to save the cell to check the function and return the cell number if necessary
-
Error copying I fixed int i to divide_left. Where would you place the loops? That's how it goes through all the cells, no? Basically I forgot to update (sorry in advance) that the instruction of the exercise is to do 3 functions one that will check from the right one to the left and the third one checks if both are met and returns the cell tax or -1. So I do not see any other way except that you will check on me from every side and if both are met then ... is there another option according to the instructions? Thanks
-
Is this what needs to be done? Because here too it is neural that there is a problem ... // ------ include section ------- #include #include // ------ std section ------- using std :: cin; using std :: cout; using std :: endl; // ------ const section const int N = 6; // The size you want to set // --- prtotypes section ---- void read_data (int arr []); int divide_left (int arr [], int cell); int divide_right (int arr [], int cell); int happend (int arr [], int cell); ///// ----- Main ------- int main () {int arr [N]; read_data (arr); int cell; int found = happend (arr, cell); cout << f
-
I change the cell with j each time up by 1 or lower by one as needed (right left) to check if the cell divides in all cells ... or in my head think differently as if I was trying to shorten it by a loop that if the cell divides on the left then with j it Will check the cell after it and so on or are thoughts apart and code apart Did you understand my intention? ... Thank you
-
You mean, like, saltines and their ilk, eh? I'll try it thanks but why does he not answer the question? Fact that in some examples it works.
-
Hi I would still love to help with this exercise I do not understand why he does not print -1 ... thanks
-
What a part ... so how do I print it? I'm already confused ... because I changed the condition in main to be inverse meaning found not equal to -1 so print -1 otherwise print the cell (message above) and I entered the example 180 120 60 30 20 15 it printed me 3 but on the other hand I entered say 6 5 4 3 2 1 the output was 1 and I entered 9 0 0 0 0 0 so the output was empty thanks
-
Hi guys I drove you really crazy but feel lonely on the subject and I have no one to turn to ... if I change the terms here: if (found! = -1) cout << cell1; else cout << "-1"; So: if (found! = -1) cout << "-1"; else cout << cell1; So in the example 180 120 60 30 20 15 output 3 that it is ok but no then it does not output -1 can someone please explain to me why? Thank you very much and sorry again
-
Sorry I'm driving you crazy but is this a better code or have you already done what you said? In fact it still prints -1. Here I used them Do you understand what I did? As if I kept the cell each time to check the following and if not then move to the next cell it still prints me -1 ... // ------ include section ------- #include #include // ------ std section ------- using std :: cin; using std :: cout; using std :: endl; // ------ const section const int N = 6; // The size you want to set // --- prtotypes section ---- void read_data (int arr []); int divide_left (int arr [], int & cell); int divide_right (int arr [], int & cell); int
-
The whole test of each cell will be in one function?
-
Don't have a simple need for them?
-
In one function or per function cell? Check there is no shortcut? hook
-
Does that mean make a pur loop for each simple cell? Or something else? As for the other, I did not understand .. Thank you