C++ Code to find odd number

#include <iostream>
using namespace std;
int main ()
/*
    Name: for loop to find odd numbers between a certain range of figure
    Copyright: Oluwashina A. Oyeniran
    Author: Oyeniran Oluwashina Akinloye
    Date: 23-07-16 08:59
    Description: C++ code to find the odd numbers between certain range of figure
    // z is defined as odd number (as in int z = 1)
    // 1 is the initial value (as in int z = 1)
    // 2 is the incremential value (as in z += 2)
    // 10 is the heighst range of value while 1 is the least (z <= 10)
*/
{
    for (int z = 1; z <= 10; z += 2)
    {
        cout << "The number is " << z << endl;
    }
    return 0;
}

Comments

Popular posts from this blog

CONCEPT OF INTELLIGENCE AS IT RELATE TO IFA DIVINATION

C++ Code that uses a do..while loop to compute and print the sum of the squares of a number obtained from the operator.

C++ Code that uses a while loop to compute and print the sum of the squares of a number obtained from the operator.