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/...
Part 2- How to install mysql-connector-c++ in Windows | Mac | SunOS | RHEL-Red Hat/Fedora Linux?
&amp;amp;amp;amp;amp;amp;amp;lt;a href="http://www.yesadvertising.com"&amp;amp;amp;amp;amp;amp;amp;gt;aff...
How to Configure conky-Lua in Ubuntu (11.10 & 12.04), Fedora, debian and LinuxMint | Howto Conky
Configure conky-Lua in Ubuntu (11.10 & 12.04), Fedora, debian and LinuxMint | Howto Conky Conky is a free, light-weight system...
How to do a disk check in Linux(Fedora,Ubuntu)
We’re all used to doing a disk check in Windows XP. It’s easy. Just double-click on “My Computer”, then select the drive you want to ...
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 latest Linux wireless drivers
Download latest Linux wireless drivers You can now download a package which lets you compile and install the latest advances on the...
How to Install JDK 7 in windows
<a href="http://www.yesadvertising.com">affiliate marketing</a> How to Install JDK...
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