Hey all, So as the subject stated it's starting to kick my but but not in the ways I thought it would. He is all over the place teaching and hard to follow. Monday we covered IF, IF THEN, NESTED IF's Which I understand just fine. What I am struggling with are the things I did not learn is the C book like "Create a Top-Down Design" and "Divided and Conquer Problems". When I come up with a problem I can solve it but when he gives us a problem by brain freezes.
I uploaded my first Take home quiz. I am not expecting the answers but a little help in understanding a few things. The first one is '3 MOD 5'. I assume it is asking me what the remainder is but 5 won't go into 3 and it would leave me with a decimal and he wants integers? If it were 5 MOD 3 (5 % 3 for C) then the answer would be 2.
Then the last one in that line up (g) 3 + 2 - 4 * 5 DIV 2. When I plug this into my computer it comes back with the answer of -5. My brain is saying 2 goes into 5, 2 times. Then 2 times 4 gives me 8, then 8 minus 2 is 6, the 6 plus 3 leaves me 9, not -5. The multiply and DIV and a higher precedence then the Plus and Minus do.
What am I missing here?
I uploaded my first Take home quiz. I am not expecting the answers but a little help in understanding a few things. The first one is '3 MOD 5'. I assume it is asking me what the remainder is but 5 won't go into 3 and it would leave me with a decimal and he wants integers? If it were 5 MOD 3 (5 % 3 for C) then the answer would be 2.
Then the last one in that line up (g) 3 + 2 - 4 * 5 DIV 2. When I plug this into my computer it comes back with the answer of -5. My brain is saying 2 goes into 5, 2 times. Then 2 times 4 gives me 8, then 8 minus 2 is 6, the 6 plus 3 leaves me 9, not -5. The multiply and DIV and a higher precedence then the Plus and Minus do.
What am I missing here?