this post was submitted on 25 Aug 2023
570 points (95.1% liked)

Programmer Humor

31251 readers
1012 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 16 points 10 months ago* (last edited 10 months ago)

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 ;
}