C Program that calculates and prints the product of the odd integers from 1 to 15.

/* C Program that calculates and prints the product of the odd integers from 1 to 15 */
#include<stdio.h>
int main()
{
	int count,product = 1;
	printf("\nThe odd numbers 1-15 are\n\n");

	for (count = 1; count <= 15; count += 2)
	{
		product = count*product;
		printf("%d\n", count);
	}
	printf("\nProduct : %d	", product);
	return 0;
}

Output :
The odd numbers 1-15 are

1
3
5
7
9
11
13
15

Product : 2027025



Leave a comment