[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hey /g, new to programming. rate my hacker code. #include <stdio.h>

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 36
Thread images: 3

Hey /g, new to programming. rate my hacker code.
#include <stdio.h>
main()
{
for(int i = 0; i <= 100; ++i){
if(i == 2)
printf("Even");
if(i == 4)
printf("Even"); if(i == 6)
printf("Even"); if(i == 8
printf("Even"); if(i == 10)

}
else printf("Odd");
}
>>
Did you copy this from Mr Robot?
>>
>>56219150
r8 no commentary nigger
>>
>>56219095
my brother please help me
i tried to run the program and it did not work
i require the rest of the program email to [email protected]
please do the needful
>>
>>56219197
wtf i hate yahoo now
>>
Bump for some actual ratings ni/g/g/ers
>>
>>56219095
Is this a meme
>>
>>56219359
Yes. Dat Boi
>>
it sucks

if (num % 2 != 0 && num != 0) {
print("odd")
} else {
print("even")
}



idiot
>>
>>56219410
0 is even despite what some people might tell you. It follows all the necessary properties of being even. Its succedent is odd and there is an N where 2*N=0.
>>
>>56219410
need semicolons after statements, should also be printf
also you could just do if(num%2){...}
>>
Rate mine:
#include <stdio.h>
int main(void){for
(int i=1;i<101;i++)
{if(!(i%3))printf
("FIZZ");if(!(i%5))
printf("BUZZ");if
(i%3&&i%5)printf
("%d",i);printf
("\n");}return 0;}
>>
>>56219197
what do u mean it did not work, the code runs fine
>>
>>56219721
Nice obfuscation
>>
>>56219721
OP here I was baiting as you can expect but god damn this is on a new level, I salute you, may god have mercy on your soul.
>>
>>56219410
Using the brackets in C

>kek
>>
File: 1466978198547.jpg (42KB, 500x388px) Image search: [Google]
1466978198547.jpg
42KB, 500x388px
>>56219721
what in the world

thank god Python exists
>>
>>56219095
thanks for the laugh :)
>>
Rate my code.


#include\
/***/ <stdio.h>
;long /***/
zero= +0x0L ;
void main \
(int YANG ,
char* DON[] )
{long a=0* 0
+zero ;long /**/ b
=((5 *+25 *1998 ) *
zero) ;long i=zero; i =
0x0; if(+ YANG< 3 ) {
printf ("arg: int1 int2" ) ; }
else{for(i=0; +DON[1][i] ; i
+= 1)a=a*10-48+ * ( i
+ DON[1]);for(i = 0 ;
- DON[2][i];i++ ) b =
10* b+DON[2][i ] -
48;if ( -
a<-b){i=a;a = b
;b=i;}while(b!= 0 )
{i=a%b;a=b;b = i;}
printf("gcd" "=%ld"
"\n",a);}}
>>
>>56220487
i dream of code like this
>>
>>56220487
Bwahaha that is some nice fucking anti-obfuscation
>>
>>56220487
>void main()
enjoy your undefined behavior
>>
Is that you in the picture?
>>
>>56220427
Are you stupid? He just removed all the spacing and line breaks.
>>
>>56219095
>not just doing Array.apply(null, new Array(100)).map(Number.call, Number).map(a => (/^-?\d*[13579]$/.test(a)) ? 'Odd' : 'Even').join('/n')
>>
File: Screenshot_2016-08-23-02-00-15.png (176KB, 1440x2560px) Image search: [Google]
Screenshot_2016-08-23-02-00-15.png
176KB, 1440x2560px
>>56220487
It almost compiles, except for the
void main
, which I had to change to int
>>
check my kode:
function FizzBuzz(length, bool, map){
this.length = ++length;
this.bool = bool;
this.map = map;
};
FizzBuzz.prototype.fizzbuzz = function(){
console.log(
Array.apply(
null, new Array(this.length)).map(
Number.call, Number).map(
i => {
let c = '';
this.map.forEach(
(
a,
b
) => {
switch(this.bool){
case true:
((''+i).indexOf(b) != -1)&&(c += a);
default:
!(i%b)&&(c += a);
break;
}
}
); return (c)?c:i
}
).slice(
1
).join(
'\n'
)
)
}
var FizzBuzzer = new FizzBuzz(100, false, new Map([[3, 'Fizz'], [5, 'Buzz'], [7, 'Woof']]));
FizzBuzzer.fizzbuzz();
>>
>>56221581
It's C.
http://uguu.org/src_comment3_c.html
>>
Rate my code.

const exec = require('child_process').exec
const fs = require('fs');

checkEquality = (this_variable, do_something_if_true, do_something_if_false) =>
{
fs.writeFile('do_something_if_true.js',`eval('(${do_something_if_true.toString().replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\'/g,"\\\'")})()')`,(err) => 1)

fs.writeFile('do_something_if_false.js',`eval('(${do_something_if_false.toString().replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\'/g,"\\\'")})()')`,(err) => 1)

exec(`echo \'exec(\"python -c \'\"\'\"\'from subprocess import Popen,PIPE;Popen([\\\"\'\"node\\\\\"\'\",\\\"\'\"-e\\\\\"\'\",Popen([\\\"\'\"cat\\\\\"\'\",\\\"\'\"do_something_if_true.js\\\\\"\'\"],stdout=PIPE).stdout.read()]) if \\\"\'\"true\\\\\"\'\"==\\\"\'\"${Math.ceil(Math.sqrt(Math.sin(((!(this_variable&&!this_variable)-1)||!(this_variable<(!!!this_variable||!this_variable))) << 3 / 2)*Math.E/Math.clz32(this_variable*Math.PI^2)))}\\\\\"\'\" else Popen([\\\"\'\"node\\\\\"\'\",\\\"\'\"-e\\\\\"\'\",Popen([\\\"\'\"cat\\\\\"\'\",\\\"\'\"do_something_if_false.js\\\\\"\'\"],stdout=PIPE).stdout.read()])\'\"\'\"\'\");print $2\'|perl`,(_, stdout, __) => console.log(stdout))

exec('rm do_something_if_true.js do_something_if_false.js')
}

// Testing the library.
checkEquality(
// Condition
3<2,
// Callback if true;
()=>console.log("It's damn true"),
//Callback if false;
()=>console.log("Hillary Clinton")
);
>>
>>56221162
hey catnip, i'm a good programmer no matter wat u say
>>
>>56221915
That is some beautiful JS, my indian friend. Much better than dead languages like C. Truly the language of the future.
>>
>>56221902
Don't care, still compiled
>>
>>56221902
It doesn't matter because C++ is compatible with C's methods anyhow
>>
>>56221949
Thanks brother just tring to create someting meaninful
>>
>>56219095
for(int i = 0; i++<100;) Console.WriteLine(i % 2 == 0 ? "Odd" : "Even");
>>
Sup fellow hackers. Rate my code:

55*4*v    _   v                                                                 
v <>:1-:^
|:<$ < ,*48 <
@>0"zzif">:#,_$ v
>:3%!| >0"zzub">:#,_$^
>:5%!|
v "buzz"0<>:. ^
|!%5: <
>:#,_ $> ^
Thread posts: 36
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.