Thanks for the reply laserlight! It's always good to hear different opinions and what not.
@CommonTater Haha! I sure do and I see what you were saying now ;)
Type: Posts; User: COG92
Thanks for the reply laserlight! It's always good to hear different opinions and what not.
@CommonTater Haha! I sure do and I see what you were saying now ;)
That's crazy...and sad! I might have to check out some of links. It could be interesting!
True, I can take confidence in that. I just don't like spending 3 hours of one of my days getting my...
Very interesting! Usually I go for whatever looks cleanest because I am a perfectionist, but sometimes my indentations get lost. I never knew there were so many styles just for indenting :) Thanks...
I agree that he would be the cheater, but unfortunately the professor doesn't see it that way. He would say it is my fault for letting it get in his hands. He is so big on it that when we turn in the...
Call me stupid...but what exactly is the One True Indentation Style?
Haha. That sounds scary! I already realized that I probably shouldn't have posted the last code because my professor is really big on catching cheaters. If two codes look too similar the students...
Haha. I like your explanation :) I didn't realize it was such a controversial issue ;) I messed around with the functions below method a little, but as of right now I prefer them above. I just wasn't...
I will make sure to leave spaces from now on! Also, for visual purposes is it better to do the thing where you have the functions at the bottom? I am not sure what it is called. Thanks for the other...
Yes, the second problem! Almost done with it! I meant to leave spaces in between the functions, but forgot to. I was wondering if you could do that with those. So, are you saying to get rid of the...
I am not sure what happened, but it is working now. Kind of frustrating, but at least it works. Thanks for looking at it anyway!
This is part of a code I am working on. If you need me to post the whole code I will. When I try to compile it tells me "incompatible type for argument 2 of 'par_complex'.
void...
Thanks! I plan on working on it for the next couple days so if I have issues I will certainly see if you guys can help!
Nice code CommonTater! I like the added part that mentions how many times the door was opened. Thank you both for all the help, tips, and advice! I really appreciate it! Now, I get to go work on the...
That makes complete sense. And it is probably a good idea to get in that habit now, even if the codes are fairly small. I am starting to realize how C would be easy and programming would be hard....
Ok... I have doors 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 as open. Is that what you have?
Thanks for that! I really enjoy the problem solving aspect of programming, and I usually try to figure it all out on my own. This time after working for several hours and getting a little too close...
Oh, duh! I can't believe I missed that. I realize you said no insults, but now I feel like a cheater and it makes me want to figure out a different way to solve it and do it that way. If it helps I...
I guess I don't fully understand it then. If I delete line 13 how will d[s*n] ever change? Won't it just stay 0 since it never gets set to anything else?
With the current code I have the value of d[i] never really changes, which means I can't print d[i]. And the values for d[s*n] are either one or zero. Needless to say I am not sure what to print.
This is what I have right now. Am I on the right track at least?
#include <stdio.h>
int main(void)
{
int i,s,d[101],n=1;
Logically that makes completely sense. Now, I am just trying to figure out what my for loops are supposed to look like since you said to swap them. I am having trouble figuring out how to make s go...
At least I am not wrong, for once. So if we count each time a particular door happens to work with s*n and that number ends up being even the door number is open. Right? Am I close? Like if door 5...
Isn't that what I said? I am struggling to see how it is different then my even odd thing. Depending on the number of times the door is changed it will tell you if the door is open or closed. For...
Hm...I am not sure what you are getting at. I keep wanting to go back to the even odd thing with your light switch analogy.
Are you saying d[i]=s*n? Or what exactly do you mean when you say the index for the doors array? Thank you both for taking time to walk through this with me. I apologize that it isn't clicking faster.