Skip to main content
Commonmark migration
Source Link

#C++ (gcc), 98 bytes

C++ (gcc), 98 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i ",x int p(int x){d);while(x>0)d=rand()%x);} 

Try it here!

Usage

int main() { p(100); } 

This is my first code golf attempt. Any feedback or remarks are welcome.

Edit: Removed the main function as suggested to make it valid.

#C++ (gcc), 98 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i ",x int p(int x){d);while(x>0)d=rand()%x);} 

Try it here!

Usage

int main() { p(100); } 

This is my first code golf attempt. Any feedback or remarks are welcome.

Edit: Removed the main function as suggested to make it valid.

C++ (gcc), 98 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i ",x int p(int x){d);while(x>0)d=rand()%x);} 

Try it here!

Usage

int main() { p(100); } 

This is my first code golf attempt. Any feedback or remarks are welcome.

Edit: Removed the main function as suggested to make it valid.

remove main function to make it valid.
Source Link
eKKiM
  • 161
  • 6

#C++ (gcc), 11698 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i""%i ",x   int p(int x){d);while(x>0)d=rand()%x);} 

Try it here!

Usage

int main() { p(9100);  } 

Try it here!

This is my first code golf attempt. Any feedback or remarks are welcome.

Edit: Removed the main function as suggested to make it valid.

#C++ (gcc), 116 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i",x int p(int x){d);while(x>0)d=rand()%x);}int main(){p(9);} 

Try it here!

This is my first code golf attempt. Any feedback or remarks are welcome.

#C++ (gcc), 98 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i ",x   int p(int x){d);while(x>0)d=rand()%x);} 

Try it here!

Usage

int main() { p(100);  } 

This is my first code golf attempt. Any feedback or remarks are welcome.

Edit: Removed the main function as suggested to make it valid.

Source Link
eKKiM
  • 161
  • 6

#C++ (gcc), 116 bytes

#import<cstdio> #import<cstdlib> #define d printf("%i",x int p(int x){d);while(x>0)d=rand()%x);}int main(){p(9);} 

Try it here!

This is my first code golf attempt. Any feedback or remarks are welcome.