Ah i understand now, thank you.
Type: Posts; User: hiven
Ah i understand now, thank you.
Is this even being used in the code though. I can see letter[0], letter[1] and letter[2], but no mention of just letter.
Sorry if im being dumb.
char c=0;
int letter [3];
letter[0]=0; letter[1]=0; letter[2]=0;
printf("please enter a letter");
scanf("%c", &c);
switch (c) {
case 'a': letter[0]++;
Ive been looking at this again and I feel like I understand it but there are few things I could do with clarification if anyone has the time to help.
The first is, is the mean value stored in...
Wait so sorry just so I understand, middle is just a place filler?
Am i correct in saying that the result of the sum/counter is meanValue? Would it not be better to use this instead of "middle"?
Hi,
The issues im having is understanding where mean value is stored, and how "middle" is being used, since it doesnt seem to be equated to anything or given any value.
Im really sorry to be a pest, but my exam is on wednesday and so far I cant solve my outstanding issues despite reading up on functions.
I would really really appreciate if anyone could give me...
void sortMiddle(float myList[10], float middle, float inferior[10], float superior[10])
{
int counter1=0, counter 2=0, counter 3=0;
while (counter1<10)
{
if...
Ah that makes more sense. So in this example the sum is adding the value of each value in myList at a time, adding them up, and then dividing that number by the counter number.
Is this right? By...
Ok. Ive commented the code. There is one line that I dont fully understand what it is doing, and I also dont understand where the value of sum/counter is going.
float list[];
float...
Ah ok that clears it up. So in order to answer the first part of the question:
"How would you declare a list of floating numbers in C?"
Would it be something as simple as this, with x being the...
How is it that the same line is used in the model answers without a size, is that an error in the model answer?
It tells me that list needs a size. Something instead like this works:
float list[1];
I dont really understand what I should be taking from this though, what does it show?
I guess at this point I should start from scratch.
"How would you declare a list of floating numbers in C?"
Is the answer to this simply:
float list[];
float is the type (replacing...
Hi,
So i understand that the top segment checks to see if the counter is less than 10, and then calculates the sum as equal to myList[counter], and then increments the counter. Im not really sure...
Hello. Im new on this forum so please go easy. I have an exam coming up soon and Im having trouble understanding the solution to the last answer in the exam. Ive listed both the question and answer...