Sunday, 1 March 2015

Write a program that calculates and prints the product of the odd integers from 1 to 15

#include <iostream>
#include <stdlib>

int main()
{
      // Variable declarations.
      int product = 1;

      for( int i = 0; i <= 7; i++)
      {
             product *= 2 * i + 1;
      }

      cout << "Product is: " << product << endl;

      system("PAUSE");
      return 0;
}


If You Enjoyed This, Take 5 Seconds To Share It