Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

Can someone tell me how to format this loop correctly ? if (month == 4 || month == 6 || month == 9 || month == 11) { maxDay = 30; } else (month == 2) { maxDay = 28; } else { maxDay = 31; }

OpenStudy (anonymous):

The first else should be 'else if' or 'elsif' or 'elif' depending on language. I am guessing c and 'else if'.

OpenStudy (anonymous):

yea it should be else if. But even if i put "else if" , the loop still doesnt work ...

OpenStudy (anonymous):

This seems to work http://codepad.org/cuBUwbbQ

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!