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

Ankit Singh

Total Post:13

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

    Post:13

    Points:65
    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-27-2018 06:30:53 AM

Answer

NEWSLETTER

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