Any funny algorithms for coding? | Sololearn: Learn to code for FREE!

0

Any funny algorithms for coding?

Hey! I have started with prime numbers finder (in my code) and I'm looking for some other entertaining algorithms. Please advice!

9/6/2018 9:20:42 PM

Leszek Michalak

1 Answer

New Answer

+1

//not funny but an interesting one. //to find if the number is even or odd in a single line int n = 10; ((n & 1) && cout<<"Odd" ) || cout <<"Even";