So basically if the counters are declared at the top of my program, I don't need to declare them again inside the loops?
Type: Posts; User: Sonny
So basically if the counters are declared at the top of my program, I don't need to declare them again inside the loops?
Yeah I agree, thanks a bunch! You don't know how much it is appreciated. Maybe in the near future i'll be helping you. :P
May I ask why you initiated the loop = 0; in both the variable declaration at the top and in the first do-while loop?
Oh dang, I didn't even see this. If I may ask what did you change around?
That's the thing this isn't a difficult problem, but it's just the little things that are getting me into trouble. I wrote the program myself and only in the most direst circumstance when every other...
I know dude haha, i've been trying to figure out what's wrong for over 3 hours now and my assignment is due tomorrow. I'm stressing out right now no time to go through it and plan it out again. :P
do {
totalPrint = 0;
for (m = 1; m < 6; m++)
{
printf("Enter Mark #%d: ", m);
scanf("%f", &mark);
while (mark > 20 || mark < 0)
{
printf("Invalid...
Ok so should the section calculation be inside the nested do-while loop? Same with the course calculation or outside their respective do-while loops?
I have tried putting it everywhere, before the for loop after the for loop and the average for the school is still the same. :s
Are you sure it has something to do with the placement of;...
I have no clue bud, i'm in the dark here. :(
Guys I finished my assignment but while changing the variable names I think I messed something up and now the calculations are wrong and I seriously can't figure out what happened. For instance, when...
Exactly.
No of course i'm going to follow my syllabus as well. I meant that I learn better by doing rather than seeing it in a textbook. So what I can do is probably look up exercises in the text book and try...
Yeah definitely, I have this 1000 page text book and going through it is not fun at all. You're right I should try to make a game.
Well said.
Yeah my prof keeps telling me it's about practice. Doing a few programs everyday but it gets really tedious after a while I don't know how you guys do it.
lmaoo! I can't even properly take a leak when i'm drunk...I will bud thank you. :)
Very efficient. :P haha thanks a lot for the help guys. Hopefully after a little more experience I can help future noobs like you're helping me. :)
I did and it works perfectly. How'd you decipher it so fast? :)
Before the do while loop?
I AM the program. lol I just posted my updated code on the last page I fixed it. :)
So i'm good right? Even with the two student ID prompts? Is there any way around that?
Yeah but look at this, it's a sample from my assignment;
As you can see it asks for the Section code (without 0 to exit) and then asks again with the zero to exit. How do I do that? :s
Enter the...
It's working perfectly now, I just added another part into the program it's working fine too. Tell me what you think.
Oh btw should the part in bold be after the validation loop or before?
...
Yeah when you put it that way...what I did, doesn't really make too much sense. :P
Do you know anything about segmentation errors? I keep getting them when I run my program on linux. :s