Home > DeveloperSection > Interviews > Write a short code using C++ to print out all odd number from 1 to 100 using a for loop

Posted on    January-15-2015 10:19 PM

 .NET C# 
Ratings:
 1 Answer(s)
  553  View(s)
Rate this:

Ankit Singh

Total Post:15

Points:75
Posted on    January-15-2015 11:19 PM

for( unsigned int i = 1; i < = 100; i++ )
if( i & 0x00000001 )
cout << i << \",\"; 

Modified On Mar-28-2016 04:22:41 AM

Don't want to miss updates? Please click the below button!

Follow MindStick