• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: July 18th, 2023

help-circle




  • bronzle@lemm.eetoProgrammer Humor@lemmy.mlno cap
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    1 year 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 ;
    }