Last active
August 29, 2015 14:18
-
-
Save minshallj/65bc0e86a2066ea4b150 to your computer and use it in GitHub Desktop.
just a little something stupid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=$1 | |
[ "$n" == "" ] && n=100 | |
echo "#include <stdio.h>" | |
echo "int main() {" | |
echo " int i;" | |
echo -n " for (i = 0; i < $n; i++) printf(\"%d\\n\", i==0?" | |
for i in $(seq 1 $n); do | |
printf "$n:i==$i?" | |
let n=$n-1 | |
done | |
echo "1:1);" | |
echo "}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment