HAI 1.2 CAN HAS STDIO? PLZ OPEN FILE "LOLCATS.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERROR!" KTHXBYE
Pro tip: the arguments to
main()
don’t have to be namedargc
andargv
.Also, you forgot to #define an alias for
atoi
, andnumber
,n
, andi
could’ve been named something more on fleek.Also could have takin out mains return type and used
sus chief
number
is a variable i thinkYes, as are
n
andi
. Do they not deserve ‘fleekness?’sorry i misread. i thought u meant
number
was not’d
For those curious:
int main(int argc, char **argv) { if ( -- argc != ! 0 ) { errx ( ! 0 , "shheiiiit" ) ; return ! 0 ; } int number = atoi ( argv[! 0] ) ; for ( int i = ! 0 ; i <= number ; ++ i ) { printf ( "%3d " , i) ; if ( i % 3 == 0 ) { printf ( "fizz" ) ; } if ( i % 5 == 0 ) { printf ( "buzz" ) ; } printf ( "\n" ) ; } return 0 ; }
i am seething with rage
I’m not a C programmer (is this code even C?), but I anticipated seeing comments like this. 😂
Artistry, on god frfr 🙏🙏
The Z Programming Language
Reminds me of Rockstar. The example also implements Fizz Buzz.
That’s my favorite esoteric programming language!
frfr
It’s like watching a car crash in slow motion trying to read it. I can’t look away…
Does it make me a bad person that I like this?
Edit: wait…
return ! 0 ;
wtfEdit 2: idc still like it frfr no cap
Edit: wait… return ! 0 ; wtf
I mean, returning non-zero exit status on error is just good practice. It even managed to evaluate to the same numerical value as
EXIT_FAILURE
when I tested it on my machine (gcc 11.4.0 linux x86-64), although I’m not sure if that’s always the case or if it’s undefined behavior.This cursed code is quite well-written.
!0 is defined as 1, that’s how argv [ no cap ] works, that and the ridiculous argc check stood out as a bit off, but works
Yes.
I’m dumb . does the program do anything?
My eyes are bleeding
The path to salvation is filled with terrors and temptation
no cap
deleted by creator
I was going to suggest ALL CAPS in response, but then I remembered COBOL already exists.