I’m grateful for the info, I’m reading as I eat breakfast before work and I don’t have time to try and figure it out. Plus I’m not a programmer so it would just have been one of those comics I never understood, because trust me I wouldn’t have spent much time on it.
More likely meant to be C++ than C as main() returns an int, and it´ll only print 499 lines as the test in the loop will not run the 500th iteration. This is why C/C++ indexes from 0 rather than 1. muttergrumbleoldprogrammermuttergrumble
Now that he’s got the program written, he still has to compile and run it, which is going to be hard to do on that blackboard. Most blackboards don’t have a C compiler.
interceptor about 10 years ago
He was supposed to write “I will not throw paper airplanes in class” 500 times. Instead he wrote computer code for a program that would do that.
Templo S.U.D. about 10 years ago
Writing “I will not [do such misbehavior] in class” a certain amount of times can really give you carpal tunnel syndrome. What a harsh punishment.
Zowayix about 10 years ago
Silly Jason, puts() is faster than printf() and you don’t even need the explicit newline at the end. Also, C? How old is this comic?
ladykat about 10 years ago
I got it.
Michael Jones about 10 years ago
Good thing he included the stdio library or it would never have compiled.
Observer fo Irony about 10 years ago
Now he is gong to have to write that program five hundred times to satisfy the teacher’s requirements
Plumbob Wilson about 10 years ago
And no syntax errors. Nice.
Deezlebird about 10 years ago
I’m grateful for the info, I’m reading as I eat breakfast before work and I don’t have time to try and figure it out. Plus I’m not a programmer so it would just have been one of those comics I never understood, because trust me I wouldn’t have spent much time on it.
Wenthral about 10 years ago
Today I would not be surprised if that teacher got fired for doing this….And the parents suing the school and winning.
bloognoo about 10 years ago
More likely meant to be C++ than C as main() returns an int, and it´ll only print 499 lines as the test in the loop will not run the 500th iteration. This is why C/C++ indexes from 0 rather than 1. muttergrumbleoldprogrammermuttergrumble
MD Bear Premium Member about 10 years ago
No real programmer starts a loop counter with 1.
The for line should be:for (count = 0; count < 500; count++) {
Or, better yet, in Perl, here’s the whole thing:
$i = 0;$msg = “I will not throw paper airplanes in class\n”;
print $msg while ($i++ < 500);
bru5ce Premium Member about 10 years ago
Um… I still program in C… Lots of use still. That said, I wrote my Internet company’s billing system in Perl 20 years ago.
nosirrom about 10 years ago
BALR 14,15
mlvezie about 10 years ago
I program in C too (for work, I write python for fun).
Obligatory python version:
for i in range(500): print(“I will not throw paper airplanes in class”)
TOMOTH about 10 years ago
I did.
I also have the ORIGINAL from ~2000.
meg_grif about 10 years ago
Now that he’s got the program written, he still has to compile and run it, which is going to be hard to do on that blackboard. Most blackboards don’t have a C compiler.
neverenoughgold about 10 years ago
So, does Jason get a “C” for this; or will he get a C++?
Justarunner Premium Member about 10 years ago
Awsome! A cartoonist that knows C!You made my day, since I am just learning to program an Arduino, and everything looked great!
KEA about 10 years ago
Works for me. (I would have given bonus points)
htmlguy about 10 years ago
Doesnt work according to IDEONE.com:Runtime errortime: 0.02 memory: 5312 signal:-1
dflak about 10 years ago
First time I saw this strip, I was still programming in C.
rgcviper about 10 years ago
Personally, I’m having a Bart Simpson moment here.
(Can’t believe no one’s said this yet …)