Hello All,
My instructor gave me a question to solve , its really simple but it keeps displaying me 0
the questions says :
Write a C program to Calculate and display the product of the even integers from 2 to 50.
here is my work and i dunno why it displays 0.
Code:#include <stdio.h>
#include <conio.h>
main()
{
int i=2,P;
while(i<50)
{
i=i+2;
P=P*i;
}
printf("the product is %d",P);
getch();
}