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;
}
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
Post a Comment
Thanks for your comments.