Open Source Technical Information: How will check a no. is of the format 2^i - 2^j ......Single line code ..... ?
ir a principal
|
Ir a lateral
Open Source Technical Information
Books,Programming and Many More Presented By Nitin Gupta
Home
|
Login
Home
Feature
Books
Linux
Privacy Policy
Contact Us
Search
ostechnoinfo on Facebook
About Author: Nitin Gupta
Click here For More Info.
Popular posts
Download pdf of Book of JAVA written by James Gosling
About James Gosling From : Wikipedia James Gosling Born May 19, 1955 (age 56) near Calgary , Alberta , Canada ...
Part1- How to install mysql-connector-c++ in Windows | Mac | SunOS | RHEL-Red Hat/Fedora Linux?
<a href="http://www.yesadvertising.com">affiliate marketing</a> Introduction MySQL ...
Part 3- How to install mysql-connector-c++ in Windows | Mac | SunOS | RHEL-Red Hat/Fedora Linux?
<a href="http://www.yesadvertising.com">affiliate marketing</a> <a href="http://ost...
How to install mysql-connector-c++ in RHEL-Red Hat/Fedora Linux?
affiliate marketing Procedure for installing mysql-connector-c++ in RHEL-Red Hat/Fedora Linux MySQL Connector/...
Download free pdf of c-unleashed
Download
Download pdf of Data Structures and Algorithms in C++ by Adam Drozdek.pdf
Using the C++ programming language, author Adam Drozdek highlights three important aspects of data structures and algorithms. First, the...
Download pdf of Modelling, Simulation and Identification Edited by: Azah Mohamed
Modelling, Simulation and Identification Edited by: Azah Mohamed ISBN 978-953-307-136-7, Hard cover, 354 pages ...
How to Install / Compile Linux Kernel 3.1 / 3.0 in Fedora 16 / 15 / 14 ?
Procedure Install / Compile Linux Kernel 3.1 / 3.0 in Fedora 16 / 15 / 14 Here in this post I will explain how to compile and insta...
Download PDF of c++ By Bjarne Stroustrup | c++ bjarne stroustrup.pdf | Pdf of C++ book written by Bjarne Stroustrup | Bjarne Stroustrup C++ Third Edition
Download PDF of C++ By Bjarne Stroustrup | c++ bjarne stroustrup.pdf | Pdf of C++ book written by Bjarne Stroustrup | Bjarne Stroustrup C...
Download pdf of Compilers - Principles Techniques and Tools by Alfred Aho - Monica Lam- Ravi Sethi- Jeffrey Ullman - Second Edition
Compilers: Principles, Techniques, and Tools The cover of the second edition (North American), showing a knight and drag...
Visitor
Feedjit Live Blog Stats
advertising
advertising
Friday, 21 October 2011
How will check a no. is of the format 2^i - 2^j ......Single line code ..... ?
Posted by
Nitin Gupta
,
at
10/21/2011 04:45:00 am
1st Way:-
using Loop:-
let the given number is n;
while(n&(n%2==0?n/=2:0) || ! printf("%s", n&(n+1)?"no":"yes")) ;
2nd Way:-
Without Loop:-
(((n-1)|n)+1) &n ==0
0 comments to “How will check a no. is of the format 2^i - 2^j ......Single line code ..... ?”
Post a Comment
Write your tips here...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Deal of the Day
Amazon.com Widgets
advertising
Advertisement here
Copyright © 2011
Open Source Technical Information
| Design by
Styleshout
-
Blogger templates
by
Blog and Web