From 6852dafe59dc59e6723b6791393c5633904fd899 Mon Sep 17 00:00:00 2001 From: Steph Date: Thu, 1 Dec 2022 21:02:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Added=20language=20selector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2020/random | Bin 0 -> 8568 bytes 2020/random.c | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 2020/random create mode 100644 2020/random.c diff --git a/2020/random b/2020/random new file mode 100755 index 0000000000000000000000000000000000000000..d53ab32e46c3ee750a611d69aa8f5c858a6680f5 GIT binary patch literal 8568 zcmeHMeQaCR6~B&~HYu%R`b8*gycM#gjF_ZNODGiLBu-zdw9VRti9vXBY$x&RkH~)B z8pMWC3aS+Xf$fiM5?aN+7@D*)X{eht7FyQ8q)F+-mj;u%jiQ9Mq7$PlY_0b@_uXSZ zzc>O-{J9%FpL2fqoOACz_xt9-KzC<_%OyCu#T|mAo@Ex&sxn&ED+Z)hw1{f_eokB~ zmO@@4F)P2-BFMGUMdg}lmBQViWY?V~R)AOogOu2p3Hu`#%KPT-#9wnxvOR49y87BVhaw#sL zw_C7a%64CY9o6&GCa+T5tIAs}E?HH7rmDH(=2&!KYxB*qa6>Gb$Q)=m(6Y5*YqKw% z^lg&uCjX?nV|Sk{iTayEOLbm@k1)#LxpTh9^M1vvANQYb*m32PAHM$bT!?J>1N*7d zW@xS|qiq7y%HUT6E2mGxs2twC2)=p|d=j{Z&zXDx%K5)>5&Vip@E-uz@Hx|V02`bj zWQu#aas~P`MBTSlq(@TGggGeEsbC^33?pp@L;H=;@P1=37>$XvnHn^s@rZ~eL&2Ej z3?pO1vKMJnm7UZQaJgbc5^yx!)e}edd7zHT0(h8Y`A@0IcmeX&7?nV!x7LzdfA4nB~9kd z+HkeBN?ad1TcwXz?yA;={_wO}k)PGaUaC4?@R#56rz%b4>t4lg&2_EdNFJvA`BQnM zx<8OiO`o5Y@-dRB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0}FABVR-;j@HQv#4YQHr$^z_4*UxW z=XKZeBE&6VT%uSXUWYp+zAz4P<%idC_A@H=7shi6c)9v7)~;uypH<=}-UzsWMf^N3 z^H(qEuNmoQVSmjkecnH$h@ZbpX5sj`0Nhoke^;OZs}TPYH4b?iUn_C;TBMtSYeliZ z{Y2sm$H^YxUW^~-I9UgLl~_10?vi-HZGl;Xij{l+NG+oO#3J~QfKz>(#vz+rs!r_VMuiAEmYms`s4SkBUP;r)LJUBas&x>(e>zGH+Dt&&>|F5YHRGu;6`;x@D)eiVh8-kPy^6 z_xg7QjKJ;=1J7Hf26%PrxO=yMS66#!j(kxAghx{&peql0$6jIV=-$)j?>6>ycJ2%G z8omCu?f`j}?{J}XMpnJ}VAtBp4|1RQ3>OIp%^*CLJ^~gUG;=A%*S=yVd6%zgDVzzft1LHxvD=%<5z`x3QBkLT2k;BH z8*uqkiebw2FWjdb{&qvABN*EsRSeS})nGa{63h1)zUSNpjP4|C&*xpHd_RMVOwRbx z`#0Tv*q+bDOr7;-J*N9%Pj@Mn`TWeZ(JEHHwb<*gU~xYfiYeRkIh*OUQgp_T+ka5m zw<$e7k2AH~uY-;=evbj8dhxNG&+SaHvzH`i|L2fvx99UcQ~9=I^WarH)9*U$Th;lL zDc6@>u*~!+hduA_OgA_#tXwYp`=P_0?-fk>Ud{T>_Ww-TbN})Ag=v%x73F#}{G7wy z`Tx$_Sy54E`SfT^@#pgSKEt$%GHuCO{wv6%y8(xZ&%gYCP^Ui2Okaa-jm@6#M~Bn{ z4eLQgCYG806)258E}!pF{C{Tte=?6xw&Q-JdjvI+?Xxu+B!PREBqD2(!Y|u1eGfTy z`@%U^6~N`N1GZ!NJQ%{bd_L!Sm7!DL(H-JL*b>%=&z{(Rqa6g#_IApBZ&z(q@SRj4f;hf90a_P)o-hP|9vR-CIMV +#include +#include + +int main(void) { + char date_string[11]; + time_t tm = time(NULL); + struct tm* local = localtime(&tm); + + // Seed the randomizer with the current date + strftime(date_string, sizeof(date_string), "%G %m %d", local); + + int sum = 1; + for(int i=0; date_string[i]; i++) + sum = sum * date_string[i]; + + srand(sum); + + // Pick a random item from the list + char* list[] = { + "C", "D", "F#", "Racket", "Pascal", + "PureScript", "Rust", "fish" + }; + int length = sizeof(list) / sizeof(list[0]); + int num = rand() % length; + printf("Your lucky language is %s\n", list[num]); +}