WRITE A SHORT CODE USING C++ TO PRINT OUT ALL ODD NUMBER FROM 1 TO 100 USING A FOR LOOP

Ankit Singh

Total Post:15

Points:75
Posted by  Ankit Singh
C# 
 907  View(s)
Ratings:
Rate this:
  1. Ankit Singh

    Post:15

    Points:75
    Write a short code using C to print out all odd number from 1 to 100 using a for loop

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

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!