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!

6th Sep 2018, 9:20 PM
Leszek Michalak
Leszek Michalak - avatar
1 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";
7th Sep 2018, 2:07 AM
‎ ‏‏‎Anonymous Guy