From 1f7bd58fb0efb2fb2559e14e3d5c2abd7255c499 Mon Sep 17 00:00:00 2001 From: Patric Dexheimer Date: Thu, 3 Oct 2019 22:52:14 -0300 Subject: [PATCH] AreYourARobot Algo in C --- AreYouARobot/main.exe | Bin 0 -> 56629 bytes AreYouARobot/robot.c | 106 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 AreYouARobot/main.exe create mode 100644 AreYouARobot/robot.c diff --git a/AreYouARobot/main.exe b/AreYouARobot/main.exe new file mode 100644 index 0000000000000000000000000000000000000000..6cad46e8f1d1322041f8e22ce033865470e4733e GIT binary patch literal 56629 zcmeIb4}4VBnKynW$%F|6CLlpn&`|>hg^)l%P_P*?6K2XJ8S{sKqBoPtBpI1Z#`yz5 zX&Vhxr(@c*wf}ylZ)xjVch}vYyS0{Dw;RL?-O?7VwX}6Dt=0~UT52t&mTi9D=bUrz zojW%K&AadZ-oCH*Gk4B8&w0-CJm)#jdCs5vuW{=LD`bon;T#)d>;OVK>iGY}e}l-L zam5oe*kdK%zw&^^_x&r|dcz4vEZ*M}5A->LfoQZp>F5kO;;E=39Cf&wTOED&yM|3GD7c(CfOHeiQpQfqMp%YZm5kyALT-Xu zDM5$B!hzp?z`>#{ML7{I$bksFLB`Ha5mEl{XY3J4ItO~*=wKaVmE+`|yPL65 zh<3iCDj6C`BJ=p=_#+V=IH^%`jt=JUsOkzN1AujqOw~9EM^z@Gbkwnq(W6?hco9O zyrs1QKviXr;v~Fvl+cel=3lq8W;F-cu0Sw~(}B~4Gv}ydW$TtMui+3cwe1O93oEv_Fow;(DI;@P7~`{M$7Y9zi|UExo>)$3IX1WfCvKLE0bD z(-P;29I{`5T6I_1uh_#eJVUQldNS6%P*crwhZ)rh$qyr`CDOSGUv6UQa*(=vRpZv= zW)!*-S?ThxD2!#;-qGZWZ&FpV!Fl+50e_xM`M&}`Gb>$|eH=XwCB6uQ8d_yZZmk*h z3_V>5+1NKpf@~G=Pkq;ZMIG}5J!?Fc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reYouARobot/robot.c new file mode 100644 index 00000000..df9f6177 --- /dev/null +++ b/AreYouARobot/robot.c @@ -0,0 +1,106 @@ +/* +compiles with: +gcc --std=c11 robot.c -o main +*/ + +#include + +#ifdef _WIN32 +#include +#else +#include +#endif + + +#define MAX_STRING_SIZE 62 + +char questions[][MAX_STRING_SIZE] = +{ + "Ready to know if you are a robot?\n", + "What is 2+2?\n", + "Good to know that you know basic math, but lets get real...\n", + "What is the answer of the universe, life and everything?\n", + "I want to believe that you are not a robot. Last Question...\n", + "What is the key? Only robots would know\n" +}; + +char input_buffer[ 128 ]; + +//cross-platform sleep +void sleep_in_secs( const float seconds ) +{ + const int milliseconds = seconds * 1000; + #ifdef _WIN32 + Sleep(milliseconds); + #else + usleep(milliseconds*1000); + #endif +} + +char* input() +{ + int i = 0; + //loops until a new-line is hit. + //this way we know where the string ended + //needed for the comparison later on + while (1) { + scanf("%c", &input_buffer[i]); + if (input_buffer[i] == '\n') { + break; + } else { + i++; + } + } + input_buffer[i] = '\0'; + return input_buffer; +} + +int str_to_int( char* string ) +{ + return atoi( string ); +} + +void delay_print( char* string ) +{ + char* letter = string; + while( *letter != '\0' ) + { + putchar(*letter); + fflush(stdout); + ++letter; + sleep_in_secs(0.1); + } +} + +char* delay_input( char* string ) +{ + delay_print(string); + return input(); + +} + +void main() +{ + delay_print( questions[0] ); + + int a1 = str_to_int( delay_input( questions[1] ) ); + if( a1 == 4) + { + delay_print( questions[2] ); + int a2 = str_to_int( delay_input( questions[3] ) ); + if( a2 == 42) + { + delay_print( questions[4] ); + char* a3 = delay_input( questions[5] ); + if( strcmp(a3 , "i'm a robot" ) == 0 ){ + delay_print("You truly are a robot\n"); + } else { + printf("You aren't a robot\n"); + } + } else { + printf("You aren't a robot\n"); + } + } else { + printf("You aren't a robot\n"); + } +} \ No newline at end of file